diff options
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r-- | include/linux/mount.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h index 5ee2df217cdf..b4836d58f428 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/nodemask.h> | ||
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
19 | 20 | ||
@@ -28,8 +29,10 @@ struct mnt_namespace; | |||
28 | #define MNT_NOATIME 0x08 | 29 | #define MNT_NOATIME 0x08 |
29 | #define MNT_NODIRATIME 0x10 | 30 | #define MNT_NODIRATIME 0x10 |
30 | #define MNT_RELATIME 0x20 | 31 | #define MNT_RELATIME 0x20 |
32 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ | ||
31 | 33 | ||
32 | #define MNT_SHRINKABLE 0x100 | 34 | #define MNT_SHRINKABLE 0x100 |
35 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ | ||
33 | 36 | ||
34 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ | 37 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ |
35 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ | 38 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ |
@@ -53,6 +56,8 @@ struct vfsmount { | |||
53 | struct list_head mnt_slave; /* slave list entry */ | 56 | struct list_head mnt_slave; /* slave list entry */ |
54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 57 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
55 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 58 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
59 | int mnt_id; /* mount identifier */ | ||
60 | int mnt_group_id; /* peer group identifier */ | ||
56 | /* | 61 | /* |
57 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | 62 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount |
58 | * to let these frequently modified fields in a separate cache line | 63 | * to let these frequently modified fields in a separate cache line |
@@ -62,6 +67,11 @@ struct vfsmount { | |||
62 | int mnt_expiry_mark; /* true if marked for expiry */ | 67 | int mnt_expiry_mark; /* true if marked for expiry */ |
63 | int mnt_pinned; | 68 | int mnt_pinned; |
64 | int mnt_ghosts; | 69 | int mnt_ghosts; |
70 | /* | ||
71 | * This value is not stable unless all of the mnt_writers[] spinlocks | ||
72 | * are held, and all mnt_writer[]s on this mount have 0 as their ->count | ||
73 | */ | ||
74 | atomic_t __mnt_writers; | ||
65 | }; | 75 | }; |
66 | 76 | ||
67 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 77 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
@@ -71,9 +81,12 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
71 | return mnt; | 81 | return mnt; |
72 | } | 82 | } |
73 | 83 | ||
84 | extern int mnt_want_write(struct vfsmount *mnt); | ||
85 | extern void mnt_drop_write(struct vfsmount *mnt); | ||
74 | extern void mntput_no_expire(struct vfsmount *mnt); | 86 | extern void mntput_no_expire(struct vfsmount *mnt); |
75 | extern void mnt_pin(struct vfsmount *mnt); | 87 | extern void mnt_pin(struct vfsmount *mnt); |
76 | extern void mnt_unpin(struct vfsmount *mnt); | 88 | extern void mnt_unpin(struct vfsmount *mnt); |
89 | extern int __mnt_is_readonly(struct vfsmount *mnt); | ||
77 | 90 | ||
78 | static inline void mntput(struct vfsmount *mnt) | 91 | static inline void mntput(struct vfsmount *mnt) |
79 | { | 92 | { |
@@ -83,8 +96,6 @@ static inline void mntput(struct vfsmount *mnt) | |||
83 | } | 96 | } |
84 | } | 97 | } |
85 | 98 | ||
86 | extern void free_vfsmnt(struct vfsmount *mnt); | ||
87 | extern struct vfsmount *alloc_vfsmnt(const char *name); | ||
88 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, | 99 | extern struct vfsmount *do_kern_mount(const char *fstype, int flags, |
89 | const char *name, void *data); | 100 | const char *name, void *data); |
90 | 101 | ||