Blame view
fs/mount.h
2.21 KB
b2dba1af3
|
1 |
#include <linux/mount.h> |
0226f4923
|
2 3 4 5 6 |
#include <linux/seq_file.h> #include <linux/poll.h> struct mnt_namespace { atomic_t count; |
be08d6d26
|
7 |
struct mount * root; |
0226f4923
|
8 9 10 11 |
struct list_head list; wait_queue_head_t poll; int event; }; |
b2dba1af3
|
12 |
|
68e8a9fea
|
13 14 15 16 |
struct mnt_pcp { int mnt_count; int mnt_writers; }; |
7d6fec45a
|
17 |
struct mount { |
1b8e5564b
|
18 |
struct list_head mnt_hash; |
0714a5338
|
19 |
struct mount *mnt_parent; |
a73324da7
|
20 |
struct dentry *mnt_mountpoint; |
7d6fec45a
|
21 |
struct vfsmount mnt; |
68e8a9fea
|
22 23 |
#ifdef CONFIG_SMP struct mnt_pcp __percpu *mnt_pcp; |
68e8a9fea
|
24 25 26 27 |
#else int mnt_count; int mnt_writers; #endif |
6b41d536f
|
28 29 |
struct list_head mnt_mounts; /* list of children, anchored here */ struct list_head mnt_child; /* and going through their mnt_child */ |
39f7c4db1
|
30 |
struct list_head mnt_instance; /* mount instance on sb->s_mounts */ |
52ba1621d
|
31 |
const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
1a4eeaf2a
|
32 |
struct list_head mnt_list; |
6776db3d3
|
33 34 35 36 |
struct list_head mnt_expire; /* link in fs-specific expiry list */ struct list_head mnt_share; /* circular list of shared mounts */ struct list_head mnt_slave_list;/* list of slave mounts */ struct list_head mnt_slave; /* slave list entry */ |
32301920f
|
37 |
struct mount *mnt_master; /* slave is on master->mnt_slave_list */ |
143c8c91c
|
38 |
struct mnt_namespace *mnt_ns; /* containing namespace */ |
c63181e6b
|
39 40 41 42 |
#ifdef CONFIG_FSNOTIFY struct hlist_head mnt_fsnotify_marks; __u32 mnt_fsnotify_mask; #endif |
15169fe78
|
43 44 |
int mnt_id; /* mount identifier */ int mnt_group_id; /* peer group identifier */ |
863d684f9
|
45 46 47 |
int mnt_expiry_mark; /* true if marked for expiry */ int mnt_pinned; int mnt_ghosts; |
7d6fec45a
|
48 |
}; |
f7a99c5b7
|
49 |
#define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */ |
7d6fec45a
|
50 51 52 53 |
static inline struct mount *real_mount(struct vfsmount *mnt) { return container_of(mnt, struct mount, mnt); } |
676da58df
|
54 |
static inline int mnt_has_parent(struct mount *mnt) |
b2dba1af3
|
55 |
{ |
0714a5338
|
56 |
return mnt != mnt->mnt_parent; |
b2dba1af3
|
57 |
} |
c71053659
|
58 |
|
f7a99c5b7
|
59 60 61 62 63 |
static inline int is_mounted(struct vfsmount *mnt) { /* neither detached nor internal? */ return !IS_ERR_OR_NULL(real_mount(mnt)); } |
c71053659
|
64 |
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); |
0226f4923
|
65 66 67 68 69 70 71 |
static inline void get_mnt_ns(struct mnt_namespace *ns) { atomic_inc(&ns->count); } struct proc_mounts { |
6ce6e24e7
|
72 |
struct seq_file m; |
0226f4923
|
73 74 75 76 |
struct mnt_namespace *ns; struct path root; int (*show)(struct seq_file *, struct vfsmount *); }; |
6ce6e24e7
|
77 |
#define proc_mounts(p) (container_of((p), struct proc_mounts, m)) |
0226f4923
|
78 |
extern const struct seq_operations mounts_op; |