diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-19 02:39:35 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-19 02:39:35 -0700 |
| commit | 00979a9fd0c7f162d5c2c262425936bf4788ded0 (patch) | |
| tree | cead2996efab220b989be3611beab5dc392f71d9 /include/linux/sunrpc | |
| parent | fb4bb3a0ca1b3d6d8f1a451245fd234eddf10ec5 (diff) | |
[PATCH] kNFSd: Make sure CACHE_NEGATIVE is cleared when a cache entry is updates.
From: NeilBrown <neilb@cse.unsw.edu.au>
This is important for update-in-place caches which may change from being
negative to posative.
Thanks to "J. Bruce Fields" <bfields@fieldses.org> and Olaf Kirch
<okir@suse.de>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/cache.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 18c776d1dc68..81e311bbaa4b 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -193,8 +193,11 @@ RTN *FNAME ARGS \ t2 = tmp; tmp = new; new = t2; \ } \ if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \ - set_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ - else {UPDATE;} \ + set_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ + else { \ + UPDATE; \ + clear_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ + } \ } \ if (set||new) write_unlock(&(DETAIL)->hash_lock); \ else read_unlock(&(DETAIL)->hash_lock); \ |
