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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -209,9 +209,6 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) · 208 unmodified lines | ||
| 209 | 209 | |
| 210 | 210 | static inline bool cache_is_expired(struct cache_detail *detail, struct cache_head *h) |
| 211 | 211 | { |
| 212 | − if (!test_bit(CACHE_VALID, &h->flags)) | |
| 213 | − return false; | |
| 214 | − | |
| 215 | 212 | return (h->expiry_time < seconds_since_boot()) || |
| 216 | 213 | (detail->flush_time >= h->last_refresh); |
| 217 | 214 | } |