|
@@ -54,6 +54,7 @@ static void cache_init(struct cache_head *h, struct cache_detail *detail)
|
|
|
h->last_refresh = now;
|
|
h->last_refresh = now;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static inline int cache_is_valid(struct cache_head *h);
|
|
|
static void cache_fresh_locked(struct cache_head *head, time_t expiry,
|
|
static void cache_fresh_locked(struct cache_head *head, time_t expiry,
|
|
|
struct cache_detail *detail);
|
|
struct cache_detail *detail);
|
|
|
static void cache_fresh_unlocked(struct cache_head *head,
|
|
static void cache_fresh_unlocked(struct cache_head *head,
|
|
@@ -100,6 +101,8 @@ struct cache_head *sunrpc_cache_lookup(struct cache_detail *detail,
|
|
|
if (cache_is_expired(detail, tmp)) {
|
|
if (cache_is_expired(detail, tmp)) {
|
|
|
hlist_del_init(&tmp->cache_list);
|
|
hlist_del_init(&tmp->cache_list);
|
|
|
detail->entries --;
|
|
detail->entries --;
|
|
|
|
|
+ if (cache_is_valid(tmp) == -EAGAIN)
|
|
|
|
|
+ set_bit(CACHE_NEGATIVE, &tmp->flags);
|
|
|
cache_fresh_locked(tmp, 0, detail);
|
|
cache_fresh_locked(tmp, 0, detail);
|
|
|
freeme = tmp;
|
|
freeme = tmp;
|
|
|
break;
|
|
break;
|