summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-02-05 09:30:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:08:00 -0500
commit8089352a13b785d4e0df63d87bd2b71c76bb9aee (patch)
treee84db2c2a5c2095091d2012c00078023b90a3490
parentd498b25a4f877be535246c4e5b6ee5890781a477 (diff)
downloadop-kernel-dev-8089352a13b785d4e0df63d87bd2b71c76bb9aee.zip
op-kernel-dev-8089352a13b785d4e0df63d87bd2b71c76bb9aee.tar.gz
Mirror MS_KERNMOUNT in ->mnt_flags
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namespace.c2
-rw-r--r--fs/super.c3
-rw-r--r--include/linux/mount.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index b0b15cc..ffa3843 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1701,7 +1701,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
{
int err;
- mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD);
+ mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL);
down_write(&namespace_sem);
/* Something was mounted here while we slept */
diff --git a/fs/super.c b/fs/super.c
index 903896e..f35ac60 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -937,6 +937,9 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
if (!mnt)
goto out;
+ if (flags & MS_KERNMOUNT)
+ mnt->mnt_flags = MNT_INTERNAL;
+
if (data && !(type->fs_flags & FS_BINARY_MOUNTDATA)) {
secdata = alloc_secdata();
if (!secdata)
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 1638961..ca726eb 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -45,6 +45,8 @@ struct mnt_namespace;
#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE)
+#define MNT_INTERNAL 0x4000
+
struct vfsmount {
struct list_head mnt_hash;
struct vfsmount *mnt_parent; /* fs we are mounted on */
OpenPOWER on IntegriCloud