diff options
Diffstat (limited to 'include/linux/sunrpc/cache.h')
-rw-r--r-- | include/linux/sunrpc/cache.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 03d3b4c92d9f..ed03c9f7f908 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -48,8 +48,10 @@ | |||
48 | struct cache_head { | 48 | struct cache_head { |
49 | struct hlist_node cache_list; | 49 | struct hlist_node cache_list; |
50 | time_t expiry_time; /* After time time, don't use the data */ | 50 | time_t expiry_time; /* After time time, don't use the data */ |
51 | time_t last_refresh; /* If CACHE_PENDING, this is when upcall | 51 | time_t last_refresh; /* If CACHE_PENDING, this is when upcall was |
52 | * was sent, else this is when update was received | 52 | * sent, else this is when update was |
53 | * received, though it is alway set to | ||
54 | * be *after* ->flush_time. | ||
53 | */ | 55 | */ |
54 | struct kref ref; | 56 | struct kref ref; |
55 | unsigned long flags; | 57 | unsigned long flags; |
@@ -105,8 +107,12 @@ struct cache_detail { | |||
105 | /* fields below this comment are for internal use | 107 | /* fields below this comment are for internal use |
106 | * and should not be touched by cache owners | 108 | * and should not be touched by cache owners |
107 | */ | 109 | */ |
108 | time_t flush_time; /* flush all cache items with last_refresh | 110 | time_t flush_time; /* flush all cache items with |
109 | * earlier than this */ | 111 | * last_refresh at or earlier |
112 | * than this. last_refresh | ||
113 | * is never set at or earlier | ||
114 | * than this. | ||
115 | */ | ||
110 | struct list_head others; | 116 | struct list_head others; |
111 | time_t nextcheck; | 117 | time_t nextcheck; |
112 | int entries; | 118 | int entries; |
@@ -203,7 +209,7 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) | |||
203 | static inline int cache_is_expired(struct cache_detail *detail, struct cache_head *h) | 209 | static inline int cache_is_expired(struct cache_detail *detail, struct cache_head *h) |
204 | { | 210 | { |
205 | return (h->expiry_time < seconds_since_boot()) || | 211 | return (h->expiry_time < seconds_since_boot()) || |
206 | (detail->flush_time > h->last_refresh); | 212 | (detail->flush_time >= h->last_refresh); |
207 | } | 213 | } |
208 | 214 | ||
209 | extern int cache_check(struct cache_detail *detail, | 215 | extern int cache_check(struct cache_detail *detail, |