diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-05-03 12:52:45 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-05-03 12:52:45 +0200 |
commit | 176d2323c7743e03e3bb4298b6f25eea2f00fed0 (patch) | |
tree | c751cba895aa8870372c97c8340166de079eae8e /net/sunrpc/cache.c | |
parent | 9b019acb72e4b5741d88e8936d6f200ed44b66b2 (diff) | |
parent | ea9866793d1e925b4d320eaea409263b2a568f38 (diff) | |
download | talos-op-linux-176d2323c7743e03e3bb4298b6f25eea2f00fed0.tar.gz talos-op-linux-176d2323c7743e03e3bb4298b6f25eea2f00fed0.zip |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r-- | net/sunrpc/cache.c | 3 |
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) 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, struct cache_detail *detail); static void cache_fresh_unlocked(struct cache_head *head, @@ -105,6 +106,8 @@ static struct cache_head *sunrpc_cache_add_entry(struct cache_detail *detail, if (cache_is_expired(detail, tmp)) { hlist_del_init_rcu(&tmp->cache_list); detail->entries --; + if (cache_is_valid(tmp) == -EAGAIN) + set_bit(CACHE_NEGATIVE, &tmp->flags); cache_fresh_locked(tmp, 0, detail); freeme = tmp; break; |