Skip to content

Commit c3d98ea

Browse files
dhowellsAl Viro
authored andcommitted
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 <[email protected]> cc: Chris Mason <[email protected]> cc: Greg Kroah-Hartman <[email protected]> cc: Steven Rostedt <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Al Viro <[email protected]>
1 parent cdf0122 commit c3d98ea

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

fs/btrfs/super.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,6 @@ static int btrfs_fill_super(struct super_block *sb,
11641164
goto fail_close;
11651165
}
11661166

1167-
save_mount_options(sb, data);
11681167
cleancache_init_fs(sb);
11691168
sb->s_flags |= MS_ACTIVE;
11701169
return 0;

fs/debugfs/inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent)
203203
struct debugfs_fs_info *fsi;
204204
int err;
205205

206-
save_mount_options(sb, data);
207-
208206
fsi = kzalloc(sizeof(struct debugfs_fs_info), GFP_KERNEL);
209207
sb->s_fs_info = fsi;
210208
if (!fsi) {

fs/reiserfs/super.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,8 +1599,6 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
15991599
}
16001600

16011601
out_ok_unlocked:
1602-
if (new_opts)
1603-
replace_mount_options(s, new_opts);
16041602
return 0;
16051603

16061604
out_err_unlock:
@@ -1916,8 +1914,6 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
19161914
char *qf_names[REISERFS_MAXQUOTAS] = {};
19171915
unsigned int qfmt = 0;
19181916

1919-
save_mount_options(s, data);
1920-
19211917
sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL);
19221918
if (!sbi)
19231919
return -ENOMEM;

fs/tracefs/inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ static int trace_fill_super(struct super_block *sb, void *data, int silent)
270270
struct tracefs_fs_info *fsi;
271271
int err;
272272

273-
save_mount_options(sb, data);
274-
275273
fsi = kzalloc(sizeof(struct tracefs_fs_info), GFP_KERNEL);
276274
sb->s_fs_info = fsi;
277275
if (!fsi) {

0 commit comments

Comments
 (0)