summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-05-08 13:36:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:08 -0400
commit4aa98cf768b6f2ea4b204620d949a665959214f6 (patch)
treedd6f5be97396b9e1f24a9697524da19463e7a8da /fs/namespace.c
parent7f78d4cd4c5d01864943c22b79df1b6bde923129 (diff)
downloadlwn-4aa98cf768b6f2ea4b204620d949a665959214f6.tar.gz
lwn-4aa98cf768b6f2ea4b204620d949a665959214f6.zip
Push BKL down into do_remount_sb()
[folded fix from Jiri Slaby] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index b94325f00c5a..2dd333b0fe7f 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -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);