Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_races-2.6.22-vanilla.patch
1 Index: linux-2.6.22.5/fs/dcache.c
2 ===================================================================
3 --- linux-2.6.22.5.orig/fs/dcache.c     2007-08-22 17:23:54.000000000 -0600
4 +++ linux-2.6.22.5/fs/dcache.c  2008-02-21 00:56:09.000000000 -0700
5 @@ -245,6 +245,13 @@
6                 spin_unlock(&dcache_lock);
7                 return 0;
8         }
9 +
10 +       /* network invalidation by Lustre */
11 +       if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
12 +               spin_unlock(&dcache_lock);
13 +               return 0;
14 +       }
15 +
16         /*
17          * Check whether to do a partial shrink_dcache
18          * to get rid of unused child entries.
19 Index: linux-2.6.22.5/include/linux/dcache.h
20 ===================================================================
21 --- linux-2.6.22.5.orig/include/linux/dcache.h  2007-08-22 17:23:54.000000000 -0600
22 +++ linux-2.6.22.5/include/linux/dcache.h       2008-02-21 00:56:09.000000000 -0700
23 @@ -174,6 +174,7 @@
24  
25  #define DCACHE_REFERENCED      0x0008  /* Recently used, don't discard. */
26  #define DCACHE_UNHASHED                0x0010  
27 +#define DCACHE_LUSTRE_INVALID  0x0040  /* Lustre invalidated */
28  
29  #define DCACHE_INOTIFY_PARENT_WATCHED  0x0020 /* Parent inode is watched */
30