1 --- linux-2.6.10/include/linux/sunrpc/cache.h.orig 2005-06-01 15:05:58.000000000 -0600
2 +++ linux-2.6.10/include/linux/sunrpc/cache.h 2005-06-01 15:12:06.000000000 -0600
3 @@ -264,13 +264,12 @@ static inline struct cache_head *cache_
5 static inline int cache_put(struct cache_head *h, struct cache_detail *cd)
7 - atomic_dec(&h->refcnt);
8 - if (!atomic_read(&h->refcnt) &&
9 - h->expiry_time < cd->nextcheck)
10 - cd->nextcheck = h->expiry_time;
11 - if (!test_bit(CACHE_HASHED, &h->flags) &&
12 - !atomic_read(&h->refcnt))
14 + if (atomic_dec_and_test(&h->refcnt)) {
15 + if (h->expiry_time < cd->nextcheck)
16 + cd->nextcheck = h->expiry_time;
17 + if (!test_bit(CACHE_HASHED, &h->flags))