From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 3 21:16:16 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B100C1065679; Fri, 3 Sep 2010 21:16:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7B38FC1B; Fri, 3 Sep 2010 21:16:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o83LGGpE063261; Fri, 3 Sep 2010 21:16:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o83LGGTo063259; Fri, 3 Sep 2010 21:16:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201009032116.o83LGGTo063259@svn.freebsd.org> From: John Baldwin Date: Fri, 3 Sep 2010 21:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212186 - stable/7/sys/nfsclient X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 21:16:16 -0000 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;