0001
0002
0003
0004
0005
0006
0007 #ifndef _LINUX_PNODE_H
0008 #define _LINUX_PNODE_H
0009
0010 #include <linux/list.h>
0011 #include "mount.h"
0012
0013 #define IS_MNT_SHARED(m) ((m)->mnt.mnt_flags & MNT_SHARED)
0014 #define IS_MNT_SLAVE(m) ((m)->mnt_master)
0015 #define IS_MNT_NEW(m) (!(m)->mnt_ns || is_anon_ns((m)->mnt_ns))
0016 #define CLEAR_MNT_SHARED(m) ((m)->mnt.mnt_flags &= ~MNT_SHARED)
0017 #define IS_MNT_UNBINDABLE(m) ((m)->mnt.mnt_flags & MNT_UNBINDABLE)
0018 #define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED)
0019 #define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED)
0020 #define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED)
0021 #define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED)
0022
0023 #define CL_EXPIRE 0x01
0024 #define CL_SLAVE 0x02
0025 #define CL_COPY_UNBINDABLE 0x04
0026 #define CL_MAKE_SHARED 0x08
0027 #define CL_PRIVATE 0x10
0028 #define CL_SHARED_TO_SLAVE 0x20
0029 #define CL_COPY_MNT_NS_FILE 0x40
0030
0031 #define CL_COPY_ALL (CL_COPY_UNBINDABLE | CL_COPY_MNT_NS_FILE)
0032
0033 static inline void set_mnt_shared(struct mount *mnt)
0034 {
0035 mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK;
0036 mnt->mnt.mnt_flags |= MNT_SHARED;
0037 }
0038
0039 void change_mnt_propagation(struct mount *, int);
0040 int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
0041 struct hlist_head *);
0042 int propagate_umount(struct list_head *);
0043 int propagate_mount_busy(struct mount *, int);
0044 void propagate_mount_unlock(struct mount *);
0045 void mnt_release_group_id(struct mount *);
0046 int get_dominating_id(struct mount *mnt, const struct path *root);
0047 int mnt_get_count(struct mount *mnt);
0048 void mnt_set_mountpoint(struct mount *, struct mountpoint *,
0049 struct mount *);
0050 void mnt_change_mountpoint(struct mount *parent, struct mountpoint *mp,
0051 struct mount *mnt);
0052 struct mount *copy_tree(struct mount *, struct dentry *, int);
0053 bool is_path_reachable(struct mount *, struct dentry *,
0054 const struct path *root);
0055 int count_mounts(struct mnt_namespace *ns, struct mount *mnt);
0056 #endif