aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-19 02:40:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:38 -0400
commit8bf9725c29f2589237dd696d06a204230add0ba3 (patch)
treeabe1a29924a592808250121435dcd12789336e8a /include
parent2e4a707269a409950c3f315010c20f9719c594e2 (diff)
pid namespaces: introduce MS_KERNMOUNT flag
This flag tells the .get_sb callback that this is a kern_mount() call so that it can trust *data pointer to be valid in-kernel one. If this flag is passed from the user process, it is cleared since the *data pointer is not a valid kernel object. Running a few steps forward - this will be needed for proc to create the superblock and store a valid pid namespace on it during the namespace creation. The reason, why the namespace cannot live without proc mount is described in the appropriate patch. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Paul Menage <menage@google.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3efff12049c6..1657e995f72c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -123,6 +123,7 @@ extern int dir_notify_enable;
123#define MS_SLAVE (1<<19) /* change to slave */ 123#define MS_SLAVE (1<<19) /* change to slave */
124#define MS_SHARED (1<<20) /* change to shared */ 124#define MS_SHARED (1<<20) /* change to shared */
125#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ 125#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
126#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
126#define MS_ACTIVE (1<<30) 127#define MS_ACTIVE (1<<30)
127#define MS_NOUSER (1<<31) 128#define MS_NOUSER (1<<31)
128 129
@@ -1459,7 +1460,8 @@ void unnamed_dev_init(void);
1459 1460
1460extern int register_filesystem(struct file_system_type *); 1461extern int register_filesystem(struct file_system_type *);
1461extern int unregister_filesystem(struct file_system_type *); 1462extern int unregister_filesystem(struct file_system_type *);
1462extern struct vfsmount *kern_mount(struct file_system_type *); 1463extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
1464#define kern_mount(type) kern_mount_data(type, NULL)
1463extern int may_umount_tree(struct vfsmount *); 1465extern int may_umount_tree(struct vfsmount *);
1464extern int may_umount(struct vfsmount *); 1466extern int may_umount(struct vfsmount *);
1465extern void umount_tree(struct vfsmount *, int, struct list_head *); 1467extern void umount_tree(struct vfsmount *, int, struct list_head *);