Whamcloud - gitweb
b=7264
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_gns-2.6-vanilla.patch
1 diff -rupN linux-2.6.7/fs/namespace.c linux-2.6.7.new/fs/namespace.c
2 --- linux-2.6.7/fs/namespace.c  2005-03-29 18:54:13.000000000 +0300
3 +++ linux-2.6.7.new/fs/namespace.c      2005-03-30 17:51:39.000000000 +0300
4 @@ -60,6 +60,7 @@ struct vfsmount *alloc_vfsmnt(const char
5                 INIT_LIST_HEAD(&mnt->mnt_child);
6                 INIT_LIST_HEAD(&mnt->mnt_mounts);
7                 INIT_LIST_HEAD(&mnt->mnt_list);
8 +               INIT_LIST_HEAD(&mnt->mnt_lustre_list);
9                 if (name) {
10                         int size = strlen(name)+1;
11                         char *newname = kmalloc(size, GFP_KERNEL);
12 @@ -173,6 +174,9 @@ void __mntput(struct vfsmount *mnt)
13  {
14         struct super_block *sb = mnt->mnt_sb;
15         dput(mnt->mnt_root);
16 +        spin_lock(&dcache_lock);
17 +        list_del(&mnt->mnt_lustre_list);
18 +        spin_unlock(&dcache_lock);
19         free_vfsmnt(mnt);
20         deactivate_super(sb);
21  }
22 diff -rupN linux-2.6.7/include/linux/dcache.h linux-2.6.7.new/include/linux/dcache.h
23 --- linux-2.6.7/include/linux/dcache.h  2005-03-29 18:54:13.000000000 +0300
24 +++ linux-2.6.7.new/include/linux/dcache.h      2005-03-31 14:35:51.589553400 +0300
25 @@ -167,7 +167,9 @@ d_iput:             no              no              no       yes
26  #define DCACHE_UNHASHED                0x0010  
27  #define DCACHE_LUSTRE_INVALID  0x0020  /* invalidated by Lustre */
28  
29 -#define DCACHE_CROSS_REF       0x0040  /* entry points to inode on another MDS */
30 +#define DCACHE_CROSS_REF        0x0040  /* entry points to inode on another MDS */
31 +#define DCACHE_GNS_PENDING      0x0080  /* entry is GNS pending mount point */
32 +#define DCACHE_GNS_MOUNTING     0x0100  /* entry is GNS mount in progress */
33  
34  extern spinlock_t dcache_lock;
35