summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authormohans <mohans@FreeBSD.org>2006-11-16 23:02:37 +0000
committermohans <mohans@FreeBSD.org>2006-11-16 23:02:37 +0000
commit3ef54eed4c5e87d0f98fa94efc573e20ed2e3bb0 (patch)
tree10b9673e89e40ee74a780b5b0a4fad282dbcb9b6 /sys/nfsclient
parent1aeb88c1a51aade9a1b62ded40e42e382d82312f (diff)
downloadFreeBSD-src-3ef54eed4c5e87d0f98fa94efc573e20ed2e3bb0.zip
FreeBSD-src-3ef54eed4c5e87d0f98fa94efc573e20ed2e3bb0.tar.gz
Fix to readdir+ reply handling. When inserting an entry into the namecache,
initialize the nfsnode's ctime. Otherwise a subsequent lookup purges the just entered namecache entry.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index d45e7bb..4308244 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2428,6 +2428,8 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
dp->d_type =
IFTODT(VTTOIF(np->n_vattr.va_type));
ndp->ni_vp = newvp;
+ /* Update n_ctime, so subsequent lookup doesn't purge entry */
+ np->n_ctime = np->n_vattr.va_ctime.tv_sec;
cache_enter(ndp->ni_dvp, ndp->ni_vp, cnp);
}
} else {
OpenPOWER on IntegriCloud