Commit 00979a9f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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>
parent fb4bb3a0
......@@ -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); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment