unsigned rootmode;
unsigned user_id;
unsigned group_id;
+ unsigned fd_present : 1;
+ unsigned rootmode_present : 1;
+ unsigned user_id_present : 1;
+ unsigned group_id_present : 1;
unsigned flags;
unsigned max_read;
};
return NULL;
if ((inode->i_state & I_NEW)) {
+ inode->i_flags |= S_NOATIME|S_NOCMTIME;
inode->i_generation = generation;
inode->i_data.backing_dev_info = &fc->bdi;
fuse_init_inode(inode, attr);
req = fuse_get_request(fc);
if (!req)
- return -ERESTARTSYS;
+ return -EINTR;
req->in.numargs = 0;
req->in.h.opcode = FUSE_STATFS;
OPT_GROUP_ID,
OPT_DEFAULT_PERMISSIONS,
OPT_ALLOW_OTHER,
- OPT_KERNEL_CACHE,
OPT_MAX_READ,
OPT_ERR
};
{OPT_GROUP_ID, "group_id=%u"},
{OPT_DEFAULT_PERMISSIONS, "default_permissions"},
{OPT_ALLOW_OTHER, "allow_other"},
- {OPT_KERNEL_CACHE, "kernel_cache"},
{OPT_MAX_READ, "max_read=%u"},
{OPT_ERR, NULL}
};
{
char *p;
memset(d, 0, sizeof(struct fuse_mount_data));
- d->fd = -1;
d->max_read = ~0;
while ((p = strsep(&opt, ",")) != NULL) {
if (match_int(&args[0], &value))
return 0;
d->fd = value;
+ d->fd_present = 1;
break;
case OPT_ROOTMODE:
if (match_octal(&args[0], &value))
return 0;
d->rootmode = value;
+ d->rootmode_present = 1;
break;
case OPT_USER_ID:
if (match_int(&args[0], &value))
return 0;
d->user_id = value;
+ d->user_id_present = 1;
break;
case OPT_GROUP_ID:
if (match_int(&args[0], &value))
return 0;
d->group_id = value;
+ d->group_id_present = 1;
break;
case OPT_DEFAULT_PERMISSIONS:
d->flags |= FUSE_ALLOW_OTHER;
break;
- case OPT_KERNEL_CACHE:
- d->flags |= FUSE_KERNEL_CACHE;
- break;
-
case OPT_MAX_READ:
if (match_int(&args[0], &value))
return 0;
return 0;
}
}
- if (d->fd == -1)
+
+ if (!d->fd_present || !d->rootmode_present ||
+ !d->user_id_present || !d->group_id_present)
return 0;
return 1;
seq_puts(m, ",default_permissions");
if (fc->flags & FUSE_ALLOW_OTHER)
seq_puts(m, ",allow_other");
- if (fc->flags & FUSE_KERNEL_CACHE)
- seq_puts(m, ",kernel_cache");
if (fc->max_read != ~0)
seq_printf(m, ",max_read=%u", fc->max_read);
return 0;
fc->max_read = d.max_read;
if (fc->max_read / PAGE_CACHE_SIZE < fc->bdi.ra_pages)
fc->bdi.ra_pages = fc->max_read / PAGE_CACHE_SIZE;
+ fc->max_write = FUSE_MAX_IN / 2;
err = -ENOMEM;
root = get_root_inode(sb, d.rootmode);