summaryrefslogtreecommitdiff
path: root/fs/mount.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/mount.h')
-rw-r--r--fs/mount.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/mount.h b/fs/mount.h
index 97737051a8b9..04d0eadc4c10 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -154,6 +154,11 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
extern seqlock_t mount_lock;
+DEFINE_LOCK_GUARD_0(mount_writer, write_seqlock(&mount_lock),
+ write_sequnlock(&mount_lock))
+DEFINE_LOCK_GUARD_0(mount_locked_reader, read_seqlock_excl(&mount_lock),
+ read_sequnlock_excl(&mount_lock))
+
struct proc_mounts {
struct mnt_namespace *ns;
struct path root;
@@ -230,4 +235,11 @@ static inline void mnt_notify_add(struct mount *m)
}
#endif
+static inline struct mount *topmost_overmount(struct mount *m)
+{
+ while (m->overmount)
+ m = m->overmount;
+ return m;
+}
+
struct mnt_namespace *mnt_ns_from_dentry(struct dentry *dentry);