Whamcloud - gitweb
add a sunrpc cache_put patch for testing.
authorericm <ericm>
Thu, 2 Jun 2005 22:19:36 +0000 (22:19 +0000)
committerericm <ericm>
Thu, 2 Jun 2005 22:19:36 +0000 (22:19 +0000)
lustre/kernel_patches/patches/linux-2.6.10-fc3-sunrpc_cacheput.patch [new file with mode: 0644]
lustre/kernel_patches/series/2.6-fc3-uml.series
lustre/kernel_patches/series/2.6-fc3.series

diff --git a/lustre/kernel_patches/patches/linux-2.6.10-fc3-sunrpc_cacheput.patch b/lustre/kernel_patches/patches/linux-2.6.10-fc3-sunrpc_cacheput.patch
new file mode 100644 (file)
index 0000000..8848f59
--- /dev/null
@@ -0,0 +1,22 @@
+--- linux-2.6.10/include/linux/sunrpc/cache.h.orig     2005-06-01 15:05:58.000000000 -0600
++++ linux-2.6.10/include/linux/sunrpc/cache.h  2005-06-01 15:12:06.000000000 -0600
+@@ -264,13 +264,12 @@ static inline struct cache_head  *cache_
+ static inline int cache_put(struct cache_head *h, struct cache_detail *cd)
+ {
+-      atomic_dec(&h->refcnt);
+-      if (!atomic_read(&h->refcnt) &&
+-          h->expiry_time < cd->nextcheck)
+-              cd->nextcheck = h->expiry_time;
+-      if (!test_bit(CACHE_HASHED, &h->flags) &&
+-          !atomic_read(&h->refcnt))
+-              return 1;
++      if (atomic_dec_and_test(&h->refcnt)) {
++              if (h->expiry_time < cd->nextcheck)
++                      cd->nextcheck = h->expiry_time;
++              if (!test_bit(CACHE_HASHED, &h->flags))
++                      return 1;
++      }
+       return 0;
+ }
index 7033c62..ea7fdc6 100644 (file)
@@ -1,4 +1,5 @@
 linux-2.6.10-CITI_NFS4_ALL-1.patch
+linux-2.6.10-fc3-sunrpc_cacheput.patch
 uml-2.6.10-fc3.patch 
 kgdb-ga.patch
 lustre_version.patch
index 69a8b18..3819f0e 100644 (file)
@@ -1,4 +1,5 @@
 linux-2.6.10-CITI_NFS4_ALL-1.patch
+linux-2.6.10-fc3-sunrpc_cacheput.patch
 uml-2.6.10-fc3.patch 
 kgdb-ga.patch
 lustre_version.patch