Blame view

fs/pnode.h 1.92 KB
59bd9ded4   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-only */
07b20889e   Ram Pai   [PATCH] beginning...
2
3
4
5
  /*
   *  linux/fs/pnode.h
   *
   * (C) Copyright IBM Corporation 2005.
07b20889e   Ram Pai   [PATCH] beginning...
6
7
8
9
10
   */
  #ifndef _LINUX_PNODE_H
  #define _LINUX_PNODE_H
  
  #include <linux/list.h>
b2dba1af3   Al Viro   vfs: new internal...
11
  #include "mount.h"
03e06e68f   Ram Pai   [PATCH] introduce...
12

fc7be130c   Al Viro   vfs: switch pnode...
13
14
15
16
17
  #define IS_MNT_SHARED(m) ((m)->mnt.mnt_flags & MNT_SHARED)
  #define IS_MNT_SLAVE(m) ((m)->mnt_master)
  #define IS_MNT_NEW(m)  (!(m)->mnt_ns)
  #define CLEAR_MNT_SHARED(m) ((m)->mnt.mnt_flags &= ~MNT_SHARED)
  #define IS_MNT_UNBINDABLE(m) ((m)->mnt.mnt_flags & MNT_UNBINDABLE)
f2ebb3a92   Al Viro   smarter propagate...
18
19
20
  #define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED)
  #define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED)
  #define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED)
0c56fe314   Eric W. Biederman   mnt: Don't propag...
21
  #define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED)
03e06e68f   Ram Pai   [PATCH] introduce...
22

b90fa9ae8   Ram Pai   [PATCH] shared mo...
23
  #define CL_EXPIRE    		0x01
a58b0eb8e   Ram Pai   [PATCH] introduce...
24
  #define CL_SLAVE     		0x02
4ce5d2b1a   Eric W. Biederman   vfs: Don't copy m...
25
  #define CL_COPY_UNBINDABLE	0x04
b90fa9ae8   Ram Pai   [PATCH] shared mo...
26
  #define CL_MAKE_SHARED 		0x08
796a6b521   Al Viro   Kill CL_PROPAGATI...
27
  #define CL_PRIVATE 		0x10
7a472ef4b   Eric W. Biederman   vfs: Only support...
28
  #define CL_SHARED_TO_SLAVE	0x20
3bd045cc9   Al Viro   separate copying ...
29
  #define CL_COPY_MNT_NS_FILE	0x40
4ce5d2b1a   Eric W. Biederman   vfs: Don't copy m...
30
31
  
  #define CL_COPY_ALL		(CL_COPY_UNBINDABLE | CL_COPY_MNT_NS_FILE)
b90fa9ae8   Ram Pai   [PATCH] shared mo...
32

0f0afb1dc   Al Viro   vfs: spread struc...
33
  static inline void set_mnt_shared(struct mount *mnt)
b90fa9ae8   Ram Pai   [PATCH] shared mo...
34
  {
0f0afb1dc   Al Viro   vfs: spread struc...
35
36
  	mnt->mnt.mnt_flags &= ~MNT_SHARED_MASK;
  	mnt->mnt.mnt_flags |= MNT_SHARED;
b90fa9ae8   Ram Pai   [PATCH] shared mo...
37
  }
0f0afb1dc   Al Viro   vfs: spread struc...
38
  void change_mnt_propagation(struct mount *, int);
84d17192d   Al Viro   get rid of full-h...
39
  int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
38129a13e   Al Viro   switch mnt_hash t...
40
  		struct hlist_head *);
c003b26ff   Eric W. Biederman   mnt: In umount_tr...
41
  int propagate_umount(struct list_head *);
1ab597386   Al Viro   vfs: spread struc...
42
  int propagate_mount_busy(struct mount *, int);
5d88457eb   Eric W. Biederman   mnt: On an unmoun...
43
  void propagate_mount_unlock(struct mount *);
4b8b21f4f   Al Viro   vfs: spread struc...
44
  void mnt_release_group_id(struct mount *);
6fc7871fe   Al Viro   vfs: spread struc...
45
  int get_dominating_id(struct mount *mnt, const struct path *root);
eae1fb3bc   Eric Biggers   fs/namespace.c: W...
46
  int mnt_get_count(struct mount *mnt);
84d17192d   Al Viro   get rid of full-h...
47
  void mnt_set_mountpoint(struct mount *, struct mountpoint *,
44d964d60   Al Viro   vfs: spread struc...
48
  			struct mount *);
1064f874a   Eric W. Biederman   mnt: Tuck mounts ...
49
50
  void mnt_change_mountpoint(struct mount *parent, struct mountpoint *mp,
  			   struct mount *mnt);
87129cc0e   Al Viro   vfs: spread struc...
51
  struct mount *copy_tree(struct mount *, struct dentry *, int);
643822b41   Al Viro   vfs: spread struc...
52
  bool is_path_reachable(struct mount *, struct dentry *,
afac7cba7   Al Viro   vfs: more mnt_par...
53
  			 const struct path *root);
d29216842   Eric W. Biederman   mnt: Add a per mo...
54
  int count_mounts(struct mnt_namespace *ns, struct mount *mnt);
07b20889e   Ram Pai   [PATCH] beginning...
55
  #endif /* _LINUX_PNODE_H */