blob: 1e22165ea41faaa59249cd6e4d58072ac68104fb [file] [log] [blame]
Ram Pai07b20882005-11-07 17:19:07 -05001/*
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 Pai03e06e62005-11-07 17:19:33 -050014/* return the next shared peer mount of @p */
15static inline struct vfsmount *next_peer(struct vfsmount *p)
16{
17 return list_entry(p->mnt_share.next, struct vfsmount, mnt_share);
18}
19
Ram Pai07b20882005-11-07 17:19:07 -050020void change_mnt_propagation(struct vfsmount *mnt, int type)
21{
Ram Pai03e06e62005-11-07 17:19:33 -050022 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 Pai07b20882005-11-07 17:19:07 -050028}