Whamcloud - gitweb
Branch: HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs-dcache_lustre_invalid-vanilla-2.6.patch
1 %diffstat
2  fs/dcache.c            |    7 +++++++
3  include/linux/dcache.h |    1 +
4  2 files changed, 8 insertions(+)
5
6 %patch
7 Index: linux-2.6.6/fs/dcache.c
8 ===================================================================
9 --- linux-2.6.6.orig/fs/dcache.c        2004-05-22 02:11:17.000000000 +0800
10 +++ linux-2.6.6/fs/dcache.c     2004-05-22 02:14:46.000000000 +0800
11 @@ -217,6 +217,13 @@ int d_invalidate(struct dentry * dentry)
12                 spin_unlock(&dcache_lock);
13                 return 0;
14         }
15 +
16 +       /* network invalidation by Lustre */
17 +       if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
18 +               spin_unlock(&dcache_lock);
19 +               return 0;
20 +       }
21 +
22         /*
23          * Check whether to do a partial shrink_dcache
24          * to get rid of unused child entries.
25 Index: linux-2.6.6/include/linux/dcache.h
26 ===================================================================
27 --- linux-2.6.6.orig/include/linux/dcache.h     2004-05-22 02:10:01.000000000 +0800
28 +++ linux-2.6.6/include/linux/dcache.h  2004-05-22 02:15:17.000000000 +0800
29 @@ -153,6 +153,7 @@ d_iput:             no              no              yes
30  
31  #define DCACHE_REFERENCED      0x0008  /* Recently used, don't discard. */
32  #define DCACHE_UNHASHED                0x0010  
33 +#define DCACHE_LUSTRE_INVALID  0x0020  /* invalidated by Lustre */
34  
35  extern spinlock_t dcache_lock;
36  
37