Push BKL down into do_remount_sb()
[folded fix from Jiri Slaby] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@ -1060,11 +1060,8 @@ static int do_umount(struct vfsmount *mnt, int flags)
|
||||
* we just try to remount it readonly.
|
||||
*/
|
||||
down_write(&sb->s_umount);
|
||||
if (!(sb->s_flags & MS_RDONLY)) {
|
||||
lock_kernel();
|
||||
if (!(sb->s_flags & MS_RDONLY))
|
||||
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
|
||||
unlock_kernel();
|
||||
}
|
||||
up_write(&sb->s_umount);
|
||||
return retval;
|
||||
}
|
||||
@ -1515,11 +1512,8 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
|
||||
down_write(&sb->s_umount);
|
||||
if (flags & MS_BIND)
|
||||
err = change_mount_flags(path->mnt, flags);
|
||||
else {
|
||||
lock_kernel();
|
||||
else
|
||||
err = do_remount_sb(sb, flags, data, 0);
|
||||
unlock_kernel();
|
||||
}
|
||||
if (!err)
|
||||
path->mnt->mnt_flags = mnt_flags;
|
||||
up_write(&sb->s_umount);
|
||||
|
Reference in New Issue
Block a user