Date: Fri, 17 Jul 2009 19:38:07 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r195744 - head/sys/nfsclient Message-ID: <200907171938.n6HJc7gY080077@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Fri Jul 17 19:38:07 2009 New Revision: 195744 URL: http://svn.freebsd.org/changeset/base/195744 Log: 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) Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Fri Jul 17 19:32:04 2009 (r195743) +++ head/sys/nfsclient/nfs_vnops.c Fri Jul 17 19:38:07 2009 (r195744) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907171938.n6HJc7gY080077>