aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-07-05 11:24:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-07-06 03:31:46 -0400
commitc3d98ea08291ca26144780f601e1fd39e4f20f7e (patch)
treed90c98ef4e026262d799657e8c765e0411bf67c0
parentcdf01226b26e98c79c13b335fbe0cbbbe850cf44 (diff)
VFS: Don't use save/replace_mount_options if not using generic_show_options
btrfs, debugfs, reiserfs and tracefs call save_mount_options() and reiserfs calls replace_mount_options(), but they then implement their own ->show_options() methods and don't touch s_options, rendering the saved options unnecessary. I'm trying to eliminate s_options to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Remove the calls to save/replace_mount_options() call in these cases. Signed-off-by: David Howells <dhowells@redhat.com> cc: Chris Mason <clm@fb.com> cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: Steven Rostedt <rostedt@goodmis.org> cc: linux-btrfs@vger.kernel.org cc: reiserfs-devel@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/btrfs/super.c1
-rw-r--r--fs/debugfs/inode.c2
-rw-r--r--fs/reiserfs/super.c4
-rw-r--r--fs/tracefs/inode.c2
4 files changed, 0 insertions, 9 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4f1cdd5058f1..8e9758b3eb23 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1164,7 +1164,6 @@ static int btrfs_fill_super(struct super_block *sb,
1164 goto fail_close; 1164 goto fail_close;
1165 } 1165 }
1166 1166
1167 save_mount_options(sb, data);
1168 cleancache_init_fs(sb); 1167 cleancache_init_fs(sb);
1169 sb->s_flags |= MS_ACTIVE; 1168 sb->s_flags |= MS_ACTIVE;
1170 return 0; 1169 return 0;
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index e892ae7d89f8..0dc9e9c0e0f8 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -203,8 +203,6 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent)
203 struct debugfs_fs_info *fsi; 203 struct debugfs_fs_info *fsi;
204 int err; 204 int err;
205 205
206 save_mount_options(sb, data);
207
208 fsi = kzalloc(sizeof(struct debugfs_fs_info), GFP_KERNEL); 206 fsi = kzalloc(sizeof(struct debugfs_fs_info), GFP_KERNEL);
209 sb->s_fs_info = fsi; 207 sb->s_fs_info = fsi;
210 if (!fsi) { 208 if (!fsi) {
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 685f1e056998..306e4e9d172d 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1599,8 +1599,6 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1599 } 1599 }
1600 1600
1601out_ok_unlocked: 1601out_ok_unlocked:
1602 if (new_opts)
1603 replace_mount_options(s, new_opts);
1604 return 0; 1602 return 0;
1605 1603
1606out_err_unlock: 1604out_err_unlock:
@@ -1916,8 +1914,6 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1916 char *qf_names[REISERFS_MAXQUOTAS] = {}; 1914 char *qf_names[REISERFS_MAXQUOTAS] = {};
1917 unsigned int qfmt = 0; 1915 unsigned int qfmt = 0;
1918 1916
1919 save_mount_options(s, data);
1920
1921 sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); 1917 sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL);
1922 if (!sbi) 1918 if (!sbi)
1923 return -ENOMEM; 1919 return -ENOMEM;
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 328e89c2cf83..bea8ad876bf9 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -270,8 +270,6 @@ static int trace_fill_super(struct super_block *sb, void *data, int silent)
270 struct tracefs_fs_info *fsi; 270 struct tracefs_fs_info *fsi;
271 int err; 271 int err;
272 272
273 save_mount_options(sb, data);
274
275 fsi = kzalloc(sizeof(struct tracefs_fs_info), GFP_KERNEL); 273 fsi = kzalloc(sizeof(struct tracefs_fs_info), GFP_KERNEL);
276 sb->s_fs_info = fsi; 274 sb->s_fs_info = fsi;
277 if (!fsi) { 275 if (!fsi) {