Push BKL down into ->remount_fs()
[xfs, btrfs, capifs, shmem don't need BKL, exempt] Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
committed by
Al Viro
parent
4195f73d13
commit
337eb00a2c
@@ -568,6 +568,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
|
||||
if (!udf_parse_options(options, &uopt, true))
|
||||
return -EINVAL;
|
||||
|
||||
lock_kernel();
|
||||
sbi->s_flags = uopt.flags;
|
||||
sbi->s_uid = uopt.uid;
|
||||
sbi->s_gid = uopt.gid;
|
||||
@@ -581,13 +582,16 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
|
||||
*flags |= MS_RDONLY;
|
||||
}
|
||||
|
||||
if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
|
||||
if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) {
|
||||
unlock_kernel();
|
||||
return 0;
|
||||
}
|
||||
if (*flags & MS_RDONLY)
|
||||
udf_close_lvid(sb);
|
||||
else
|
||||
udf_open_lvid(sb);
|
||||
|
||||
unlock_kernel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user