summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient/nfs_clrpcops.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-09-07 14:29:45 +0000
committerjhb <jhb@FreeBSD.org>2010-09-07 14:29:45 +0000
commit0f939dc96e7e1aec8c86f3cad8891d9e3c0ffe1b (patch)
tree0a023b40473f508ea26e1ba4b2b9dfcfc657c1a4 /sys/fs/nfsclient/nfs_clrpcops.c
parentb33adc1bec8364e4d51804534d77029137887f5d (diff)
downloadFreeBSD-src-0f939dc96e7e1aec8c86f3cad8891d9e3c0ffe1b.zip
FreeBSD-src-0f939dc96e7e1aec8c86f3cad8891d9e3c0ffe1b.tar.gz
Store the full timestamp when caching timestamps of files and
directories for purposes of validating name cache entries. This closes races where two updates to a file or directory within the same second could result in stale entries in the name cache. While here, remove the 'n_expiry' field as it is no longer used. Reviewed by: rmacklem MFC after: 1 week
Diffstat (limited to 'sys/fs/nfsclient/nfs_clrpcops.c')
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 89fd0a2..2512ad4 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -3293,8 +3293,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
ndp->ni_vp = newvp;
NFSCNHASH(cnp, HASHINIT);
if (cnp->cn_namelen <= NCHNAMLEN) {
- np->n_ctime =
- np->n_vattr.na_ctime.tv_sec;
+ np->n_ctime = np->n_vattr.na_ctime;
cache_enter(ndp->ni_dvp,ndp->ni_vp,cnp);
}
if (unlocknewvp)
OpenPOWER on IntegriCloud