aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 12bb23b8e0c5..261131dfa1f1 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -54,6 +54,7 @@ static void cache_init(struct cache_head *h, struct cache_detail *detail)
54 h->last_refresh = now; 54 h->last_refresh = now;
55} 55}
56 56
57static inline int cache_is_valid(struct cache_head *h);
57static void cache_fresh_locked(struct cache_head *head, time_t expiry, 58static void cache_fresh_locked(struct cache_head *head, time_t expiry,
58 struct cache_detail *detail); 59 struct cache_detail *detail);
59static void cache_fresh_unlocked(struct cache_head *head, 60static void cache_fresh_unlocked(struct cache_head *head,
@@ -105,6 +106,8 @@ static struct cache_head *sunrpc_cache_add_entry(struct cache_detail *detail,
105 if (cache_is_expired(detail, tmp)) { 106 if (cache_is_expired(detail, tmp)) {
106 hlist_del_init_rcu(&tmp->cache_list); 107 hlist_del_init_rcu(&tmp->cache_list);
107 detail->entries --; 108 detail->entries --;
109 if (cache_is_valid(tmp) == -EAGAIN)
110 set_bit(CACHE_NEGATIVE, &tmp->flags);
108 cache_fresh_locked(tmp, 0, detail); 111 cache_fresh_locked(tmp, 0, detail);
109 freeme = tmp; 112 freeme = tmp;
110 break; 113 break;