mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
UPSTREAM: virtiofs: get rid of no_mount_options
This option was introduced so that for virtio_fs we don't show any mounts options fuse_show_options(). Because we don't offer any of these options to be controlled by mounter. Very soon we are planning to introduce option "dax" which mounter should be able to specify. And no_mount_options does not work anymore. Change-Id: Ie1e206608dc662526e2316a5bcbc6312384cc7e5 Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
8350f125f2
commit
623454131d
3 changed files with 20 additions and 19 deletions
|
|
@ -502,7 +502,7 @@ struct fuse_fs_context {
|
|||
bool destroy:1;
|
||||
bool no_control:1;
|
||||
bool no_force_umount:1;
|
||||
bool no_mount_options:1;
|
||||
bool legacy_opts_show:1;
|
||||
unsigned int max_read;
|
||||
unsigned int blksize;
|
||||
const char *subtype;
|
||||
|
|
@ -630,6 +630,9 @@ struct fuse_conn {
|
|||
/** cache READLINK responses in page cache */
|
||||
unsigned cache_symlinks:1;
|
||||
|
||||
/* show legacy mount options */
|
||||
unsigned int legacy_opts_show:1;
|
||||
|
||||
/*
|
||||
* The following bitfields are only for optimization purposes
|
||||
* and hence races in setting them will not cause malfunction
|
||||
|
|
@ -737,9 +740,6 @@ struct fuse_conn {
|
|||
/** Do not allow MNT_FORCE umount */
|
||||
unsigned int no_force_umount:1;
|
||||
|
||||
/* Do not show mount options */
|
||||
unsigned int no_mount_options:1;
|
||||
|
||||
/** Passthrough mode for read/write IO */
|
||||
unsigned int passthrough:1;
|
||||
|
||||
|
|
|
|||
|
|
@ -583,19 +583,20 @@ static int fuse_show_options(struct seq_file *m, struct dentry *root)
|
|||
struct super_block *sb = root->d_sb;
|
||||
struct fuse_conn *fc = get_fuse_conn_super(sb);
|
||||
|
||||
if (fc->no_mount_options)
|
||||
return 0;
|
||||
|
||||
seq_printf(m, ",user_id=%u", from_kuid_munged(fc->user_ns, fc->user_id));
|
||||
seq_printf(m, ",group_id=%u", from_kgid_munged(fc->user_ns, fc->group_id));
|
||||
if (fc->default_permissions)
|
||||
seq_puts(m, ",default_permissions");
|
||||
if (fc->allow_other)
|
||||
seq_puts(m, ",allow_other");
|
||||
if (fc->max_read != ~0)
|
||||
seq_printf(m, ",max_read=%u", fc->max_read);
|
||||
if (sb->s_bdev && sb->s_blocksize != FUSE_DEFAULT_BLKSIZE)
|
||||
seq_printf(m, ",blksize=%lu", sb->s_blocksize);
|
||||
if (fc->legacy_opts_show) {
|
||||
seq_printf(m, ",user_id=%u",
|
||||
from_kuid_munged(fc->user_ns, fc->user_id));
|
||||
seq_printf(m, ",group_id=%u",
|
||||
from_kgid_munged(fc->user_ns, fc->group_id));
|
||||
if (fc->default_permissions)
|
||||
seq_puts(m, ",default_permissions");
|
||||
if (fc->allow_other)
|
||||
seq_puts(m, ",allow_other");
|
||||
if (fc->max_read != ~0)
|
||||
seq_printf(m, ",max_read=%u", fc->max_read);
|
||||
if (sb->s_bdev && sb->s_blocksize != FUSE_DEFAULT_BLKSIZE)
|
||||
seq_printf(m, ",blksize=%lu", sb->s_blocksize);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1227,11 +1228,11 @@ int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx)
|
|||
fc->allow_other = ctx->allow_other;
|
||||
fc->user_id = ctx->user_id;
|
||||
fc->group_id = ctx->group_id;
|
||||
fc->legacy_opts_show = ctx->legacy_opts_show;
|
||||
fc->max_read = max_t(unsigned, 4096, ctx->max_read);
|
||||
fc->destroy = ctx->destroy;
|
||||
fc->no_control = ctx->no_control;
|
||||
fc->no_force_umount = ctx->no_force_umount;
|
||||
fc->no_mount_options = ctx->no_mount_options;
|
||||
|
||||
err = -ENOMEM;
|
||||
root = fuse_get_root_inode(sb, ctx->rootmode);
|
||||
|
|
@ -1356,6 +1357,7 @@ static int fuse_init_fs_context(struct fs_context *fc)
|
|||
|
||||
ctx->max_read = ~0;
|
||||
ctx->blksize = FUSE_DEFAULT_BLKSIZE;
|
||||
ctx->legacy_opts_show = true;
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
if (fc->fs_type == &fuseblk_fs_type) {
|
||||
|
|
|
|||
|
|
@ -1107,7 +1107,6 @@ static int virtio_fs_fill_super(struct super_block *sb)
|
|||
.destroy = true,
|
||||
.no_control = true,
|
||||
.no_force_umount = true,
|
||||
.no_mount_options = true,
|
||||
};
|
||||
|
||||
mutex_lock(&virtio_fs_mutex);
|
||||
|
|
|
|||
Loading…
Reference in a new issue