summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorValerie Aurora <vaurora@redhat.com>2010-01-26 14:20:47 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:07:55 -0500
commit495d6c9c6595ec7b37910dfd42634839431d21fd (patch)
tree375a2ea9803a91c5df34df80d7e08119d9772240 /fs
parent2ecdc82ef0b03e67ce5ecee79d0d108177a704df (diff)
downloadlinux-495d6c9c6595ec7b37910dfd42634839431d21fd.tar.gz
linux-495d6c9c6595ec7b37910dfd42634839431d21fd.tar.bz2
linux-495d6c9c6595ec7b37910dfd42634839431d21fd.zip
VFS: Clean up shared mount flag propagation
The handling of mount flags in set_mnt_shared() got a little tangled up during previous cleanups, with the following problems: * MNT_PNODE_MASK is defined as a literal constant when it should be a bitwise xor of other MNT_* flags * set_mnt_shared() clears and then sets MNT_SHARED (part of MNT_PNODE_MASK) * MNT_PNODE_MASK could use a comment in mount.h * MNT_PNODE_MASK is a terrible name, change to MNT_SHARED_MASK This patch fixes these problems. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c2
-rw-r--r--fs/pnode.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 25c1dcf9e9eb..d25d4602ab50 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1538,7 +1538,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
err = do_remount_sb(sb, flags, data, 0);
if (!err) {
spin_lock(&vfsmount_lock);
- mnt_flags |= path->mnt->mnt_flags & MNT_PNODE_MASK;
+ mnt_flags |= path->mnt->mnt_flags & MNT_PROPAGATION_MASK;
path->mnt->mnt_flags = mnt_flags;
spin_unlock(&vfsmount_lock);
}
diff --git a/fs/pnode.h b/fs/pnode.h
index 6c7ef3252a26..1ea4ae1efcd3 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -25,7 +25,7 @@
static inline void set_mnt_shared(struct vfsmount *mnt)
{
- mnt->mnt_flags &= ~MNT_PNODE_MASK;
+ mnt->mnt_flags &= ~MNT_SHARED_MASK;
mnt->mnt_flags |= MNT_SHARED;
}