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)
This commit is contained in:
Rick Macklem 2009-07-14 23:10:23 +00:00
parent b35687df13
commit 405229f913

View File

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