summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4idmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-08-12 08:55:22 +0200
committerJ. Bruce Fields <bfields@redhat.com>2010-09-08 01:21:20 +0200
commitc5b29f885afe890f953f7f23424045cdad31d3e4 (patch)
treecc2016f256da966974b4ed7a24ff9378a77facb2 /fs/nfsd/nfs4idmap.c
parentsunrpc: extract some common sunrpc_cache code from nfsd (diff)
downloadlinux-c5b29f885afe890f953f7f23424045cdad31d3e4.tar.xz
linux-c5b29f885afe890f953f7f23424045cdad31d3e4.zip
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>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-rw-r--r--fs/nfsd/nfs4idmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index c78dbf493424..808b33a4a090 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -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;