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.
This commit is contained in:
Mohan Srinivasan 2006-11-16 23:02:37 +00:00
parent 011af721cd
commit 87c125cecc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164345

View File

@ -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 {