summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-07-14 23:10:23 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-07-14 23:10:23 +0000
commit7d9d8e91f8c954f9b07db4b974d7f1fea56dad8d (patch)
treec9768144f78f18757e2de0f1ae62e940e04eabc5
parent50c96d8f042d19384144c442c22ee0e0a7314ca9 (diff)
downloadFreeBSD-src-7d9d8e91f8c954f9b07db4b974d7f1fea56dad8d.zip
FreeBSD-src-7d9d8e91f8c954f9b07db4b974d7f1fea56dad8d.tar.gz
Fix the experimental nfs client so that it does not cause a
"share->excl" panic when doing a lookup of dotdot at the root of a server's file system. The patch avoids calling vn_lock() for that case, since nfscl_nget() has already acquired a lock for the vnode. Approved by: re (kensmith), kib (mentor)
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 81b78a0..f75787b 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1127,7 +1127,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