sunrpc: use seconds since boot in expiry cache
This protects us from confusion when the wallclock time changes. We convert to and from wallclock when setting or reading expiry times. Also use seconds since boot for last_clost time. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
committed by
J. Bruce Fields
parent
17cebf658e
commit
c5b29f885a
@@ -550,7 +550,7 @@ do_idmap_lookup_nowait(struct ent *(*lookup_fn)(struct ent *),
|
||||
goto out_err;
|
||||
ret = -ETIMEDOUT;
|
||||
if (!test_bit(CACHE_VALID, &(*item)->h.flags)
|
||||
|| (*item)->h.expiry_time < get_seconds()
|
||||
|| (*item)->h.expiry_time < seconds_since_boot()
|
||||
|| detail->flush_time > (*item)->h.last_refresh)
|
||||
goto out_put;
|
||||
ret = -ENOENT;
|
||||
|
Reference in New Issue
Block a user