瀏覽代碼

[PATCH] shared mounts: cleanup

Small cleanups in shared mounts code.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Miklos Szeredi 19 年之前
父節點
當前提交
bf066c7db7
共有 4 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      fs/namespace.c
  2. 1 1
      fs/pnode.c
  3. 1 1
      include/linux/fs.h
  4. 2 1
      include/linux/mount.h

+ 1 - 1
fs/namespace.c

@@ -451,7 +451,7 @@ EXPORT_SYMBOL(may_umount);
 void release_mounts(struct list_head *head)
 void release_mounts(struct list_head *head)
 {
 {
 	struct vfsmount *mnt;
 	struct vfsmount *mnt;
-	while(!list_empty(head)) {
+	while (!list_empty(head)) {
 		mnt = list_entry(head->next, struct vfsmount, mnt_hash);
 		mnt = list_entry(head->next, struct vfsmount, mnt_hash);
 		list_del_init(&mnt->mnt_hash);
 		list_del_init(&mnt->mnt_hash);
 		if (mnt->mnt_parent != mnt) {
 		if (mnt->mnt_parent != mnt) {

+ 1 - 1
fs/pnode.c

@@ -103,7 +103,7 @@ static struct vfsmount *propagation_next(struct vfsmount *m,
 		struct vfsmount *next;
 		struct vfsmount *next;
 		struct vfsmount *master = m->mnt_master;
 		struct vfsmount *master = m->mnt_master;
 
 
-		if ( master == origin->mnt_master ) {
+		if (master == origin->mnt_master) {
 			next = next_peer(m);
 			next = next_peer(m);
 			return ((next == origin) ? NULL : next);
 			return ((next == origin) ? NULL : next);
 		} else if (m->mnt_slave.next != &master->mnt_slave_list)
 		} else if (m->mnt_slave.next != &master->mnt_slave_list)

+ 1 - 1
include/linux/fs.h

@@ -103,11 +103,11 @@ extern int dir_notify_enable;
 #define MS_MOVE		8192
 #define MS_MOVE		8192
 #define MS_REC		16384
 #define MS_REC		16384
 #define MS_VERBOSE	32768
 #define MS_VERBOSE	32768
+#define MS_POSIXACL	(1<<16)	/* VFS does not apply the umask */
 #define MS_UNBINDABLE	(1<<17)	/* change to unbindable */
 #define MS_UNBINDABLE	(1<<17)	/* change to unbindable */
 #define MS_PRIVATE	(1<<18)	/* change to private */
 #define MS_PRIVATE	(1<<18)	/* change to private */
 #define MS_SLAVE	(1<<19)	/* change to slave */
 #define MS_SLAVE	(1<<19)	/* change to slave */
 #define MS_SHARED	(1<<20)	/* change to shared */
 #define MS_SHARED	(1<<20)	/* change to shared */
-#define MS_POSIXACL	(1<<16)	/* VFS does not apply the umask */
 #define MS_ACTIVE	(1<<30)
 #define MS_ACTIVE	(1<<30)
 #define MS_NOUSER	(1<<31)
 #define MS_NOUSER	(1<<31)
 
 

+ 2 - 1
include/linux/mount.h

@@ -22,7 +22,8 @@
 #define MNT_NOEXEC	0x04
 #define MNT_NOEXEC	0x04
 #define MNT_SHARED	0x10	/* if the vfsmount is a shared mount */
 #define MNT_SHARED	0x10	/* if the vfsmount is a shared mount */
 #define MNT_UNBINDABLE	0x20	/* if the vfsmount is a unbindable mount */
 #define MNT_UNBINDABLE	0x20	/* if the vfsmount is a unbindable mount */
-#define MNT_PNODE_MASK	0x30	/* propogation flag mask */
+
+#define MNT_PNODE_MASK	(MNT_SHARED | MNT_UNBINDABLE)
 
 
 struct vfsmount {
 struct vfsmount {
 	struct list_head mnt_hash;
 	struct list_head mnt_hash;