VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / linux / mount.h
index 61554dd..42e2c94 100644 (file)
@@ -29,8 +29,11 @@ struct vfsmount
        struct list_head mnt_child;     /* and going through their mnt_child */
        atomic_t mnt_count;
        int mnt_flags;
+       int mnt_expiry_mark;            /* true if marked for expiry */
        char *mnt_devname;              /* Name of device e.g. /dev/dsk/hda1 */
        struct list_head mnt_list;
+       struct list_head mnt_fslink;    /* link in fs-specific expiry list */
+       struct namespace *mnt_namespace; /* containing namespace */
 };
 
 static inline struct vfsmount *mntget(struct vfsmount *mnt)
@@ -42,7 +45,7 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt)
 
 extern void __mntput(struct vfsmount *mnt);
 
-static inline void mntput(struct vfsmount *mnt)
+static inline void _mntput(struct vfsmount *mnt)
 {
        if (mnt) {
                if (atomic_dec_and_test(&mnt->mnt_count))
@@ -50,10 +53,26 @@ static inline void mntput(struct vfsmount *mnt)
        }
 }
 
+static inline void mntput(struct vfsmount *mnt)
+{
+       if (mnt) {
+               mnt->mnt_expiry_mark = 0;
+               _mntput(mnt);
+       }
+}
+
 extern void free_vfsmnt(struct vfsmount *mnt);
 extern struct vfsmount *alloc_vfsmnt(const char *name);
 extern struct vfsmount *do_kern_mount(const char *fstype, int flags,
                                      const char *name, void *data);
+
+struct nameidata;
+
+extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
+                       int mnt_flags, struct list_head *fslist);
+
+extern void mark_mounts_for_expiry(struct list_head *mounts);
+
 extern spinlock_t vfsmount_lock;
 
 #endif