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
......@@ -194,7 +194,10 @@ RTN *FNAME ARGS \
} \
if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \
set_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \
else {UPDATE;} \
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