Skip to content
Snippets Groups Projects
Commit 3022a8fa authored by Eric Mei's avatar Eric Mei
Browse files

add a sunrpc cache_put patch for testing.

parent 6db22160
No related branches found
No related tags found
No related merge requests found
--- 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;
}
linux-2.6.10-CITI_NFS4_ALL-1.patch linux-2.6.10-CITI_NFS4_ALL-1.patch
linux-2.6.10-fc3-sunrpc_cacheput.patch
uml-2.6.10-fc3.patch uml-2.6.10-fc3.patch
kgdb-ga.patch kgdb-ga.patch
lustre_version.patch lustre_version.patch
......
linux-2.6.10-CITI_NFS4_ALL-1.patch linux-2.6.10-CITI_NFS4_ALL-1.patch
linux-2.6.10-fc3-sunrpc_cacheput.patch
uml-2.6.10-fc3.patch uml-2.6.10-fc3.patch
kgdb-ga.patch kgdb-ga.patch
lustre_version.patch lustre_version.patch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment