summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-02-22 15:15:28 +0000
committerphk <phk@FreeBSD.org>2005-02-22 15:15:28 +0000
commit839d4adad41bb22ca9a07a738793ed594487144f (patch)
tree3f21eab02e407844e817fdc24b815176cf21fb62 /sys/nfs4client
parentef9c88d1506f8edc31f314cc3a142fb14af594e5 (diff)
downloadFreeBSD-src-839d4adad41bb22ca9a07a738793ed594487144f.zip
FreeBSD-src-839d4adad41bb22ca9a07a738793ed594487144f.tar.gz
Follow v_id changes in NFSv[23]
Diffstat (limited to 'sys/nfs4client')
-rw-r--r--sys/nfs4client/nfs4_vnops.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c
index 75ed530..7e133cf 100644
--- a/sys/nfs4client/nfs4_vnops.c
+++ b/sys/nfs4client/nfs4_vnops.c
@@ -962,7 +962,6 @@ nfs4_lookup(struct vop_lookup_args *ap)
if ((error = cache_lookup(dvp, vpp, cnp)) && error != ENOENT) {
struct vattr vattr;
- int vpid;
if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) {
*vpp = NULLVP;
@@ -971,7 +970,6 @@ nfs4_lookup(struct vop_lookup_args *ap)
vhold(*vpp);
newvp = *vpp;
- vpid = newvp->v_id;
/*
* See the comment starting `Step through' in ufs/ufs_lookup.c
* for an explanation of the locking protocol
@@ -996,18 +994,16 @@ nfs4_lookup(struct vop_lookup_args *ap)
}
}
if (!error) {
- if (vpid == newvp->v_id) {
- if (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred, td)
- && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime) {
- nfsstats.lookupcache_hits++;
- if (cnp->cn_nameiop != LOOKUP &&
- (flags & ISLASTCN))
- cnp->cn_flags |= SAVENAME;
- vdrop(newvp);
- return (0);
- }
- cache_purge(newvp);
+ if (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred, td)
+ && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime) {
+ nfsstats.lookupcache_hits++;
+ if (cnp->cn_nameiop != LOOKUP &&
+ (flags & ISLASTCN))
+ cnp->cn_flags |= SAVENAME;
+ vdrop(newvp);
+ return (0);
}
+ cache_purge(newvp);
vput(newvp);
if (lockparent && dvp != newvp && (flags & ISLASTCN))
VOP_UNLOCK(dvp, 0, td);
OpenPOWER on IntegriCloud