/*
 *  linux/fs/pnode.h
 *
 * (C) Copyright IBM Corporation 2005.
 *	Released under GPL v2.
 *
 */
#ifndef _LINUX_PNODE_H
#define _LINUX_PNODE_H

#include <linux/list.h>
#include "mount.h"

#define IS_MNT_SHARED(mnt) ((mnt)->mnt_flags & MNT_SHARED)
#define IS_MNT_SLAVE(mnt) ((mnt)->mnt_master)
#define IS_MNT_NEW(mnt)  (!(mnt)->mnt_ns)
#define CLEAR_MNT_SHARED(mnt) ((mnt)->mnt_flags &= ~MNT_SHARED)
#define IS_MNT_UNBINDABLE(mnt) ((mnt)->mnt_flags & MNT_UNBINDABLE)

#define CL_EXPIRE    		0x01
#define CL_SLAVE     		0x02
#define CL_COPY_ALL 		0x04
#define CL_MAKE_SHARED 		0x08
#define CL_PRIVATE 		0x10

static inline void set_mnt_shared(struct mount *mnt)
{
	mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK;
	mnt->mnt.mnt_flags |= MNT_SHARED;
}

void change_mnt_propagation(struct mount *, int);
int propagate_mnt(struct vfsmount *, struct dentry *, struct vfsmount *,
		struct list_head *);
int propagate_umount(struct list_head *);
int propagate_mount_busy(struct vfsmount *, int);
void mnt_release_group_id(struct mount *);
int get_dominating_id(struct vfsmount *mnt, const struct path *root);
unsigned int mnt_get_count(struct vfsmount *mnt);
void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
			struct vfsmount *);
void release_mounts(struct list_head *);
void umount_tree(struct mount *, int, struct list_head *);
struct mount *copy_tree(struct vfsmount *, struct dentry *, int);
bool is_path_reachable(struct vfsmount *, struct dentry *,
			 const struct path *root);
#endif /* _LINUX_PNODE_H */
