]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-vfs_races-2.6.20-vanilla.patch
- more strict values parser
[packages/kernel.git] / kernel-vfs_races-2.6.20-vanilla.patch
1 Index: linux-2.6.20.3/fs/dcache.c
2 ===================================================================
3 --- linux-2.6.20.3.orig/fs/dcache.c     2007-08-14 18:10:44.000000000 +0200
4 +++ linux-2.6.20.3/fs/dcache.c  2007-08-14 18:17:16.000000000 +0200
5 @@ -235,6 +235,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 @@ -1412,13 +1419,22 @@
20   * Adds a dentry to the hash according to its name.
21   */
22   
23 -void d_rehash(struct dentry * entry)
24 +void d_rehash_cond(struct dentry * entry, int lock)
25  {
26 -       spin_lock(&dcache_lock);
27 +       if (lock)
28 +               spin_lock(&dcache_lock);
29         spin_lock(&entry->d_lock);
30         _d_rehash(entry);
31         spin_unlock(&entry->d_lock);
32 -       spin_unlock(&dcache_lock);
33 +       if (lock)
34 +               spin_unlock(&dcache_lock);
35 +}
36 +
37 +EXPORT_SYMBOL(d_rehash_cond);
38 +
39 +void d_rehash(struct dentry * entry)
40 +{
41 +       d_rehash_cond(entry, 1);
42  }
43  
44  #define do_switch(x,y) do { \
45 Index: linux-2.6.20.3/include/linux/dcache.h
46 ===================================================================
47 --- linux-2.6.20.3.orig/include/linux/dcache.h  2007-08-14 18:10:44.000000000 +0200
48 +++ linux-2.6.20.3/include/linux/dcache.h       2007-08-14 18:17:16.000000000 +0200
49 @@ -173,6 +173,8 @@
50  
51  #define DCACHE_REFERENCED      0x0008  /* Recently used, don't discard. */
52  #define DCACHE_UNHASHED                0x0010  
53 +#define DCACHE_LUSTRE_INVALID     0x0040  /* Lustre invalidated */
54 +
55  
56  #define DCACHE_INOTIFY_PARENT_WATCHED  0x0020 /* Parent inode is watched */
57  
This page took 0.031014 seconds and 3 git commands to generate.