aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-01-16 13:01:26 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-01-16 13:01:26 -0500
commit7b43a79f32c0a05e7562043af98e25c05c89b18e (patch)
tree920010b3bad9bd2cb7b9f4f2a7305a40400758da
parentdf1a1ad29739f032f8905310796e558589403d61 (diff)
mnt_flags fixes in do_remount()
* need vfsmount_lock over modifying it * need to preserve MNT_SHARED/MNT_UNBINDABLE Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namespace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 4de493ea67cf..779293e29b85 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1536,8 +1536,12 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
1536 err = change_mount_flags(path->mnt, flags); 1536 err = change_mount_flags(path->mnt, flags);
1537 else 1537 else
1538 err = do_remount_sb(sb, flags, data, 0); 1538 err = do_remount_sb(sb, flags, data, 0);
1539 if (!err) 1539 if (!err) {
1540 spin_lock(&vfsmount_lock);
1541 mnt_flags |= path->mnt->mnt_flags & MNT_PNODE_MASK;
1540 path->mnt->mnt_flags = mnt_flags; 1542 path->mnt->mnt_flags = mnt_flags;
1543 spin_unlock(&vfsmount_lock);
1544 }
1541 up_write(&sb->s_umount); 1545 up_write(&sb->s_umount);
1542 if (!err) { 1546 if (!err) {
1543 security_sb_post_remount(path->mnt, flags, data); 1547 security_sb_post_remount(path->mnt, flags, data);