From: ericm Date: Thu, 2 Jun 2005 22:19:36 +0000 (+0000) Subject: add a sunrpc cache_put patch for testing. X-Git-Tag: v1_7_100~1221 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3022a8fa98411106e14e3f473ee6e4b9fc95e477 add a sunrpc cache_put patch for testing. --- 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 index 0000000..8848f59 --- /dev/null +++ b/lustre/kernel_patches/patches/linux-2.6.10-fc3-sunrpc_cacheput.patch @@ -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; + } diff --git a/lustre/kernel_patches/series/2.6-fc3-uml.series b/lustre/kernel_patches/series/2.6-fc3-uml.series index 7033c62..ea7fdc6 100644 --- a/lustre/kernel_patches/series/2.6-fc3-uml.series +++ b/lustre/kernel_patches/series/2.6-fc3-uml.series @@ -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 diff --git a/lustre/kernel_patches/series/2.6-fc3.series b/lustre/kernel_patches/series/2.6-fc3.series index 69a8b18..3819f0e 100644 --- a/lustre/kernel_patches/series/2.6-fc3.series +++ b/lustre/kernel_patches/series/2.6-fc3.series @@ -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