Commit fdbf5348661ac9d519164d1489f30cc0384fda58
Committed by
Al Viro
1 parent
a3ec947c85
Exists in
master
and in
7 other branches
Unroll essentials of do_remount_sb() into devpts
On remount, devpts fs only needs to parse the mount options. Users cannot directly create/dirty files in /dev/pts so the MS_RDONLY flag and shrinking the dcache does not really apply to devpts. So effectively on remount, devpts only parses the mount options and updates these options in its super block. As such, we could replace do_remount_sb() call with a direct parse_mount_options(). Doing so enables subsequent patches to avoid parsing the mount options twice and simplify the code. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
fs/devpts/inode.c
... | ... | @@ -437,6 +437,8 @@ |
437 | 437 | void *data, struct vfsmount *mnt) |
438 | 438 | { |
439 | 439 | struct super_block *s; |
440 | + struct pts_mount_opts *opts; | |
441 | + struct pts_fs_info *fsi; | |
440 | 442 | int error; |
441 | 443 | |
442 | 444 | s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); |
... | ... | @@ -453,7 +455,10 @@ |
453 | 455 | } |
454 | 456 | s->s_flags |= MS_ACTIVE; |
455 | 457 | } |
456 | - do_remount_sb(s, flags, data, 0); | |
458 | + fsi = DEVPTS_SB(s); | |
459 | + opts = &fsi->mount_opts; | |
460 | + parse_mount_options(data, PARSE_REMOUNT, opts); | |
461 | + | |
457 | 462 | simple_set_mnt(mnt, s); |
458 | 463 | return 0; |
459 | 464 | } |