summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-07-17 19:38:07 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-07-17 19:38:07 +0000
commitdb1bf25adde7f22207c0905ba9e8d3ff76ea87d4 (patch)
treefbe7000ab5255b2edd566b75454c68733021b612 /sys/nfsclient
parenta1f78e164214141f530fa8d073a4a18ccb5e0b37 (diff)
downloadFreeBSD-src-db1bf25adde7f22207c0905ba9e8d3ff76ea87d4.zip
FreeBSD-src-db1bf25adde7f22207c0905ba9e8d3ff76ea87d4.tar.gz
Patch the regular nfs client in a manner analagous to
r195704 for the experimental client. The patch avoids calling vn_lock() for the case where nfs_nget() has acquired the same vnode as dvp, since nfs_nget() has already locked the vnode. Reviewed by: kib, jhb Approved by: re (kensmith), kib (mentor)
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 692b38b..c37eb34 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -1061,7 +1061,8 @@ nfs_lookup(struct vop_lookup_args *ap)
if (error == 0)
newvp = NFSTOV(np);
vfs_unbusy(mp);
- vn_lock(dvp, ltype | LK_RETRY);
+ if (newvp != dvp)
+ vn_lock(dvp, ltype | LK_RETRY);
if (dvp->v_iflag & VI_DOOMED) {
if (error == 0) {
if (newvp == dvp)
OpenPOWER on IntegriCloud