aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 b0b15cc2117c..ffa3843404e0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1701,7 +1701,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
1701{ 1701{
1702 int err; 1702 int err;
1703 1703
1704 mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD); 1704 mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL);
1705 1705
1706 down_write(&namespace_sem); 1706 down_write(&namespace_sem);
1707 /* Something was mounted here while we slept */ 1707 /* Something was mounted here while we slept */
diff --git a/fs/super.c b/fs/super.c
index 903896ec7c73..f35ac6022109 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
937 if (!mnt) 937 if (!mnt)
938 goto out; 938 goto out;
939 939
940 if (flags & MS_KERNMOUNT)
941 mnt->mnt_flags = MNT_INTERNAL;
942
940 if (data && !(type->fs_flags & FS_BINARY_MOUNTDATA)) { 943 if (data && !(type->fs_flags & FS_BINARY_MOUNTDATA)) {
941 secdata = alloc_secdata(); 944 secdata = alloc_secdata();
942 if (!secdata) 945 if (!secdata)
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 163896137ab5..ca726ebf50a3 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -45,6 +45,8 @@ struct mnt_namespace;
45#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) 45#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE)
46 46
47 47
48#define MNT_INTERNAL 0x4000
49
48struct vfsmount { 50struct vfsmount {
49 struct list_head mnt_hash; 51 struct list_head mnt_hash;
50 struct vfsmount *mnt_parent; /* fs we are mounted on */ 52 struct vfsmount *mnt_parent; /* fs we are mounted on */