This file is indexed.

/usr/src/kernel-patches/lustre/patches/vfs_races-2.6.22-vanilla.patch is in linux-patch-lustre 1.8.5+dfsg-3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Index: linux-2.6.22.5/fs/dcache.c
===================================================================
--- linux-2.6.22.5.orig/fs/dcache.c	2007-08-22 17:23:54.000000000 -0600
+++ linux-2.6.22.5/fs/dcache.c	2008-02-21 00:56:09.000000000 -0700
@@ -245,6 +245,13 @@
 		spin_unlock(&dcache_lock);
 		return 0;
 	}
+
+	/* network invalidation by Lustre */
+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
+		spin_unlock(&dcache_lock);
+		return 0;
+	}
+
 	/*
 	 * Check whether to do a partial shrink_dcache
 	 * to get rid of unused child entries.
@@ -1441,13 +1448,22 @@
  * Adds a dentry to the hash according to its name.
  */
  
-void d_rehash(struct dentry * entry)
+void d_rehash_cond(struct dentry * entry, int lock)
 {
-	spin_lock(&dcache_lock);
+	if (lock)
+		spin_lock(&dcache_lock);
 	spin_lock(&entry->d_lock);
 	_d_rehash(entry);
 	spin_unlock(&entry->d_lock);
-	spin_unlock(&dcache_lock);
+	if (lock)
+		spin_unlock(&dcache_lock);
+}
+
+EXPORT_SYMBOL(d_rehash_cond);
+
+void d_rehash(struct dentry * entry)
+{
+	d_rehash_cond(entry, 1);
 }
 
 /*
Index: linux-2.6.22.5/include/linux/dcache.h
===================================================================
--- linux-2.6.22.5.orig/include/linux/dcache.h	2007-08-22 17:23:54.000000000 -0600
+++ linux-2.6.22.5/include/linux/dcache.h	2008-02-21 00:56:09.000000000 -0700
@@ -174,6 +174,7 @@
 
 #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
 #define DCACHE_UNHASHED		0x0010	
+#define DCACHE_LUSTRE_INVALID	0x0040  /* Lustre invalidated */
 
 #define DCACHE_INOTIFY_PARENT_WATCHED	0x0020 /* Parent inode is watched by inotify */