new helpers: lock_mount_hash/unlock_mount_hash
[linux-2.6-block.git] / fs / mount.h
index 64a858143ff923ab80499d5a865bde9de2257314..7076f25af35d939e4d0b6ca721b15d227203a82c 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/mount.h>
 #include <linux/seq_file.h>
 #include <linux/poll.h>
+#include <linux/lglock.h>
 
 struct mnt_namespace {
        atomic_t                count;
@@ -55,7 +56,7 @@ struct mount {
        int mnt_group_id;               /* peer group identifier */
        int mnt_expiry_mark;            /* true if marked for expiry */
        int mnt_pinned;
-       int mnt_ghosts;
+       struct path mnt_ex_mountpoint;
 };
 
 #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
@@ -83,6 +84,18 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
        atomic_inc(&ns->count);
 }
 
+extern struct lglock vfsmount_lock;
+
+static inline void lock_mount_hash(void)
+{
+       br_write_lock(&vfsmount_lock);
+}
+
+static inline void unlock_mount_hash(void)
+{
+       br_write_unlock(&vfsmount_lock);
+}
+
 struct proc_mounts {
        struct seq_file m;
        struct mnt_namespace *ns;