qlcnic: Fix return value in qlcnic_probe()
[cascardo/linux.git] / fs / mount.h
index 6740a62..0ad6f76 100644 (file)
@@ -1,10 +1,11 @@
 #include <linux/mount.h>
 #include <linux/seq_file.h>
 #include <linux/poll.h>
+#include <linux/ns_common.h>
 
 struct mnt_namespace {
        atomic_t                count;
-       unsigned int            proc_inum;
+       struct ns_common        ns;
        struct mount *  root;
        struct list_head        list;
        struct user_namespace   *user_ns;
@@ -21,6 +22,7 @@ struct mnt_pcp {
 struct mountpoint {
        struct hlist_node m_hash;
        struct dentry *m_dentry;
+       struct hlist_head m_list;
        int m_count;
 };
 
@@ -29,7 +31,10 @@ struct mount {
        struct mount *mnt_parent;
        struct dentry *mnt_mountpoint;
        struct vfsmount mnt;
-       struct rcu_head mnt_rcu;
+       union {
+               struct rcu_head mnt_rcu;
+               struct llist_node mnt_llist;
+       };
 #ifdef CONFIG_SMP
        struct mnt_pcp __percpu *mnt_pcp;
 #else
@@ -48,6 +53,7 @@ struct mount {
        struct mount *mnt_master;       /* slave is on master->mnt_slave_list */
        struct mnt_namespace *mnt_ns;   /* containing namespace */
        struct mountpoint *mnt_mp;      /* where is it mounted */
+       struct hlist_node mnt_mp_list;  /* list mounts with the same mountpoint */
 #ifdef CONFIG_FSNOTIFY
        struct hlist_head mnt_fsnotify_marks;
        __u32 mnt_fsnotify_mask;
@@ -82,6 +88,15 @@ extern struct mount *__lookup_mnt_last(struct vfsmount *, struct dentry *);
 
 extern bool legitimize_mnt(struct vfsmount *, unsigned);
 
+extern void __detach_mounts(struct dentry *dentry);
+
+static inline void detach_mounts(struct dentry *dentry)
+{
+       if (!d_mountpoint(dentry))
+               return;
+       __detach_mounts(dentry);
+}
+
 static inline void get_mnt_ns(struct mnt_namespace *ns)
 {
        atomic_inc(&ns->count);
@@ -112,3 +127,12 @@ struct proc_mounts {
 #define proc_mounts(p) (container_of((p), struct proc_mounts, m))
 
 extern const struct seq_operations mounts_op;
+
+extern bool __is_local_mountpoint(struct dentry *dentry);
+static inline bool is_local_mountpoint(struct dentry *dentry)
+{
+       if (!d_mountpoint(dentry))
+               return false;
+
+       return __is_local_mountpoint(dentry);
+}