History

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.

Trond Myklebust committed 6 years ago

Commit 277f27e1 parent 65286b82 files · +19 −20Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/sunrpc/cache.h+0−3
@@ -209,9 +209,6 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) · 208 unmodified lines
209209
210210 static inline bool cache_is_expired(struct cache_detail *detail, struct cache_head *h)
211211 {
212− if (!test_bit(CACHE_VALID, &h->flags))
213− return false;
214−
215212 return (h->expiry_time < seconds_since_boot()) ||
216213 (detail->flush_time >= h->last_refresh);
217214 }