diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-08 13:31:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:08 -0400 |
commit | 6fac98dd218653c6aff8a0f56305c424930cea2a (patch) | |
tree | 0c5bdca0092e5ec3b201bae958071a7e8385409d /fs/namespace.c | |
parent | bbd6851a3213a525128473e978b692ab6ac11aba (diff) |
Push BKL into do_mount()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 7e537f0393b5..4740f7bdb556 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1921,6 +1921,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1921 | if (retval) | 1921 | if (retval) |
1922 | goto dput_out; | 1922 | goto dput_out; |
1923 | 1923 | ||
1924 | lock_kernel(); | ||
1924 | if (flags & MS_REMOUNT) | 1925 | if (flags & MS_REMOUNT) |
1925 | retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags, | 1926 | retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags, |
1926 | data_page); | 1927 | data_page); |
@@ -1933,6 +1934,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1933 | else | 1934 | else |
1934 | retval = do_new_mount(&path, type_page, flags, mnt_flags, | 1935 | retval = do_new_mount(&path, type_page, flags, mnt_flags, |
1935 | dev_name, data_page); | 1936 | dev_name, data_page); |
1937 | unlock_kernel(); | ||
1936 | dput_out: | 1938 | dput_out: |
1937 | path_put(&path); | 1939 | path_put(&path); |
1938 | return retval; | 1940 | return retval; |
@@ -2046,10 +2048,8 @@ SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, | |||
2046 | if (retval < 0) | 2048 | if (retval < 0) |
2047 | goto out3; | 2049 | goto out3; |
2048 | 2050 | ||
2049 | lock_kernel(); | ||
2050 | retval = do_mount((char *)dev_page, dir_page, (char *)type_page, | 2051 | retval = do_mount((char *)dev_page, dir_page, (char *)type_page, |
2051 | flags, (void *)data_page); | 2052 | flags, (void *)data_page); |
2052 | unlock_kernel(); | ||
2053 | free_page(data_page); | 2053 | free_page(data_page); |
2054 | 2054 | ||
2055 | out3: | 2055 | out3: |