Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147851
b: refs/heads/master
c: 7f78d4c
h: refs/heads/master
i:
  147849: f7cc45f
  147847: f5447a4
v: v3
  • Loading branch information
Al Viro committed Jun 12, 2009
1 parent 6a39c85 commit 4e9511c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fac98dd218653c6aff8a0f56305c424930cea2a
refs/heads/master: 7f78d4cd4c5d01864943c22b79df1b6bde923129
9 changes: 6 additions & 3 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,11 @@ 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
else {
lock_kernel();
err = do_remount_sb(sb, flags, data, 0);
unlock_kernel();
}
if (!err)
path->mnt->mnt_flags = mnt_flags;
up_write(&sb->s_umount);
Expand Down Expand Up @@ -1630,7 +1633,9 @@ static int do_new_mount(struct path *path, char *type, int flags,
if (!capable(CAP_SYS_ADMIN))
return -EPERM;

lock_kernel();
mnt = do_kern_mount(type, flags, name, data);
unlock_kernel();
if (IS_ERR(mnt))
return PTR_ERR(mnt);

Expand Down Expand Up @@ -1921,7 +1926,6 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
if (retval)
goto dput_out;

lock_kernel();
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
Expand All @@ -1934,7 +1938,6 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
else
retval = do_new_mount(&path, type_page, flags, mnt_flags,
dev_name, data_page);
unlock_kernel();
dput_out:
path_put(&path);
return retval;
Expand Down

0 comments on commit 4e9511c

Please sign in to comment.