Push lock_super() into the ->remount_fs() of filesystems that care about it
Note that since we can't run into contention between remount_fs and write_super (due to exclusion on s_umount), we have to care only about filesystems that touch lock_super() on their own. Out of those ext3, ext4, hpfs, sysv and ufs do need it; fat doesn't since its ->remount_fs() only accesses assign-once data (basically, it's "we have no atime on directories and only have atime on files for vfat; force nodiratime and possibly noatime into *flags"). [folded a build fix from hch] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -398,6 +398,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
|
||||
|
||||
*flags |= MS_NOATIME;
|
||||
|
||||
lock_super(s);
|
||||
uid = sbi->sb_uid; gid = sbi->sb_gid;
|
||||
umask = 0777 & ~sbi->sb_mode;
|
||||
lowercase = sbi->sb_lowercase; conv = sbi->sb_conv;
|
||||
@@ -430,9 +431,11 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
|
||||
|
||||
replace_mount_options(s, new_opts);
|
||||
|
||||
unlock_super(s);
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
unlock_super(s);
|
||||
kfree(new_opts);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user