summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 9d40b89..d9bdcea 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -776,6 +776,7 @@ nfs_lookup(struct vop_lookup_args *ap)
return (error);
}
+ vhold(*vpp);
newvp = *vpp;
vpid = newvp->v_id;
/*
@@ -809,6 +810,7 @@ nfs_lookup(struct vop_lookup_args *ap)
if (cnp->cn_nameiop != LOOKUP &&
(flags & ISLASTCN))
cnp->cn_flags |= SAVENAME;
+ vdrop(newvp);
return (0);
}
cache_purge(newvp);
@@ -817,6 +819,7 @@ nfs_lookup(struct vop_lookup_args *ap)
if (lockparent && dvp != newvp && (flags & ISLASTCN))
VOP_UNLOCK(dvp, 0, td);
}
+ vdrop(newvp);
error = vn_lock(dvp, LK_EXCLUSIVE, td);
*vpp = NULLVP;
if (error) {
OpenPOWER on IntegriCloud