@@ -222,23 +222,6 @@
}
}
-static int try_to_negate_entry(struct cache_detail *detail, struct cache_head *h)
-{
- int rv;
-
- write_lock(&detail->hash_lock);
- rv = cache_is_valid(detail, h);
- if (rv != -EAGAIN) {
- write_unlock(&detail->hash_lock);
- return rv;
- }
- set_bit(CACHE_NEGATIVE, &h->flags);
- cache_fresh_locked(h, seconds_since_boot()+CACHE_NEW_EXPIRY);
- write_unlock(&detail->hash_lock);
- cache_fresh_unlocked(h, detail);
- return -ENOENT;
-}
-
/*
* This is the generic cache management routine for all
* the authentication caches.
@@ -275,10 +258,15 @@
if (!test_and_set_bit(CACHE_PENDING, &h->flags)) {
switch (cache_make_upcall(detail, h)) {
case -EINVAL:
- clear_bit(CACHE_PENDING, &h->flags);
- cache_revisit_request(h);
- rv = try_to_negate_entry(detail, h);
- break;
+ write_lock(&detail->hash_lock);
+ rv = cache_is_valid(detail, h);
+ if (rv == -EAGAIN) {
+ set_bit(CACHE_NEGATIVE, &h->flags);
+ cache_fresh_locked(h, seconds_since_boot()+CACHE_NEW_EXPIRY);
+ rv = -ENOENT;
+ }
+ write_unlock(&detail->hash_lock);
+ /* FALLTHROUGH */
case -EAGAIN:
clear_bit(CACHE_PENDING, &h->flags);
cache_revisit_request(h);