Back to home page

LXR

 
 

    


0001 /*
0002  *  linux/fs/pnode.h
0003  *
0004  * (C) Copyright IBM Corporation 2005.
0005  *  Released under GPL v2.
0006  *
0007  */
0008 #ifndef _LINUX_PNODE_H
0009 #define _LINUX_PNODE_H
0010 
0011 #include <linux/list.h>
0012 #include "mount.h"
0013 
0014 #define IS_MNT_SHARED(m) ((m)->mnt.mnt_flags & MNT_SHARED)
0015 #define IS_MNT_SLAVE(m) ((m)->mnt_master)
0016 #define IS_MNT_NEW(m)  (!(m)->mnt_ns)
0017 #define CLEAR_MNT_SHARED(m) ((m)->mnt.mnt_flags &= ~MNT_SHARED)
0018 #define IS_MNT_UNBINDABLE(m) ((m)->mnt.mnt_flags & MNT_UNBINDABLE)
0019 #define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED)
0020 #define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED)
0021 #define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED)
0022 #define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED)
0023 
0024 #define CL_EXPIRE           0x01
0025 #define CL_SLAVE            0x02
0026 #define CL_COPY_UNBINDABLE  0x04
0027 #define CL_MAKE_SHARED      0x08
0028 #define CL_PRIVATE      0x10
0029 #define CL_SHARED_TO_SLAVE  0x20
0030 #define CL_UNPRIVILEGED     0x40
0031 #define CL_COPY_MNT_NS_FILE 0x80
0032 
0033 #define CL_COPY_ALL     (CL_COPY_UNBINDABLE | CL_COPY_MNT_NS_FILE)
0034 
0035 static inline void set_mnt_shared(struct mount *mnt)
0036 {
0037     mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK;
0038     mnt->mnt.mnt_flags |= MNT_SHARED;
0039 }
0040 
0041 void change_mnt_propagation(struct mount *, int);
0042 int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
0043         struct hlist_head *);
0044 int propagate_umount(struct list_head *);
0045 int propagate_mount_busy(struct mount *, int);
0046 void propagate_mount_unlock(struct mount *);
0047 void mnt_release_group_id(struct mount *);
0048 int get_dominating_id(struct mount *mnt, const struct path *root);
0049 unsigned int mnt_get_count(struct mount *mnt);
0050 void mnt_set_mountpoint(struct mount *, struct mountpoint *,
0051             struct mount *);
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 /* _LINUX_PNODE_H */