Date: Fri, 3 Sep 2010 21:16:16 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r212186 - stable/7/sys/nfsclient Message-ID: <201009032116.o83LGGTo063259@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Sep 3 21:16:16 2010 New Revision: 212186 URL: http://svn.freebsd.org/changeset/base/212186 Log: MFC: Use VN_LOCK_* macros to manipulate vnode lock flags. Modified: stable/7/sys/nfsclient/nfs_node.c Modified: stable/7/sys/nfsclient/nfs_node.c ============================================================================== --- stable/7/sys/nfsclient/nfs_node.c Fri Sep 3 18:00:17 2010 (r212185) +++ stable/7/sys/nfsclient/nfs_node.c Fri Sep 3 21:16:16 2010 (r212186) @@ -158,15 +158,15 @@ nfs_nget(struct mount *mntp, nfsfh_t *fh /* * NFS supports recursive and shared locking. */ - vp->v_vnlock->lk_flags |= LK_CANRECURSE; - vp->v_vnlock->lk_flags &= ~LK_NOSHARE; + lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, td); + VN_LOCK_AREC(vp); + VN_LOCK_ASHARE(vp); if (fhsize > NFS_SMALLFH) { MALLOC(np->n_fhp, nfsfh_t *, fhsize, M_NFSBIGFH, M_WAITOK); } else np->n_fhp = &np->n_fh; bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize); np->n_fhsize = fhsize; - lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, td); error = insmntque(vp, mntp); if (error != 0) { *npp = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009032116.o83LGGTo063259>