Ram Pai | 07b2088 | 2005-11-07 17:19:07 -0500 | [diff] [blame] | 1 | /* |
| 2 | * linux/fs/pnode.c |
| 3 | * |
| 4 | * (C) Copyright IBM Corporation 2005. |
| 5 | * Released under GPL v2. |
| 6 | * Author : Ram Pai (linuxram@us.ibm.com) |
| 7 | * |
| 8 | */ |
| 9 | #include <linux/namespace.h> |
| 10 | #include <linux/mount.h> |
| 11 | #include <linux/fs.h> |
| 12 | #include "pnode.h" |
| 13 | |
Ram Pai | 03e06e6 | 2005-11-07 17:19:33 -0500 | [diff] [blame^] | 14 | /* return the next shared peer mount of @p */ |
| 15 | static inline struct vfsmount *next_peer(struct vfsmount *p) |
| 16 | { |
| 17 | return list_entry(p->mnt_share.next, struct vfsmount, mnt_share); |
| 18 | } |
| 19 | |
Ram Pai | 07b2088 | 2005-11-07 17:19:07 -0500 | [diff] [blame] | 20 | void change_mnt_propagation(struct vfsmount *mnt, int type) |
| 21 | { |
Ram Pai | 03e06e6 | 2005-11-07 17:19:33 -0500 | [diff] [blame^] | 22 | if (type == MS_SHARED) { |
| 23 | mnt->mnt_flags |= MNT_SHARED; |
| 24 | } else { |
| 25 | list_del_init(&mnt->mnt_share); |
| 26 | mnt->mnt_flags &= ~MNT_PNODE_MASK; |
| 27 | } |
Ram Pai | 07b2088 | 2005-11-07 17:19:07 -0500 | [diff] [blame] | 28 | } |