diff options
Diffstat (limited to 'include/linux/sunrpc/cache.h')
-rw-r--r-- | include/linux/sunrpc/cache.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 0f64de7caa39..10891b70fc7b 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -179,6 +179,9 @@ sunrpc_cache_update(struct cache_detail *detail, extern int sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h); +extern int +sunrpc_cache_pipe_upcall_timeout(struct cache_detail *detail, + struct cache_head *h); extern void cache_clean_deferred(void *owner); @@ -206,11 +209,11 @@ 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 (h->expiry_time < seconds_since_boot()) + return true; if (!test_bit(CACHE_VALID, &h->flags)) return false; - - return (h->expiry_time < seconds_since_boot()) || - (detail->flush_time >= h->last_refresh); + return detail->flush_time >= h->last_refresh; } extern int cache_check(struct cache_detail *detail, |