diff options
author | Trond Myklebust | 2020-03-01 18:21:43 -0500 |
---|---|---|
committer | Chuck Lever | 2020-03-16 12:04:34 -0400 |
commit | 277f27e2f27752cd1a7901443d72e908ddea8a2e (patch) | |
tree | 470b71a2c1a36a0d0e04f000c483a901f3c914db /include/linux/sunrpc | |
parent | 65286b883c6de6b30928c837c47c167e82bde0b2 (diff) |
SUNRPC/cache: Allow garbage collection of invalid cache entries
If the cache entry never gets initialised, we want the garbage
collector to be able to evict it. Otherwise if the upcall daemon
fails to initialise the entry, we end up never expiring it.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
[ cel: resolved a merge conflict ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/cache.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 656882a50991..532cdbda43da 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -209,9 +209,6 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) static inline bool cache_is_expired(struct cache_detail *detail, struct cache_head *h) { - if (!test_bit(CACHE_VALID, &h->flags)) - return false; - return (h->expiry_time < seconds_since_boot()) || (detail->flush_time >= h->last_refresh); } |