Date: Mon, 14 Sep 2009 15:16:17 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r197192 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/coretemp dev/xen/xenpci fs/nfsclient nfsclient Message-ID: <200909141516.n8EFGHRO058408@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon Sep 14 15:16:17 2009 New Revision: 197192 URL: http://svn.freebsd.org/changeset/base/197192 Log: MFC r197048: Add LK_NOWITNESS to the vn_lock() calls done on newly created nfs vnodes, since these nodes are not linked into the mount queue and, as such, the vn_lock() cannot cause a deadlock so LORs are harmless. Suggested by: kib Approved by: re (kensmith), kib (mentor) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/coretemp/coretemp.c (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/fs/nfsclient/nfs_clnode.c stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/nfsclient/nfs_node.c Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clnode.c Mon Sep 14 13:16:16 2009 (r197191) +++ stable/8/sys/fs/nfsclient/nfs_clnode.c Mon Sep 14 15:16:17 2009 (r197192) @@ -157,7 +157,7 @@ ncl_nget(struct mount *mntp, u_int8_t *f M_NFSFH, M_WAITOK); bcopy(fhp, np->n_fhp->nfh_fh, fhsize); np->n_fhp->nfh_len = fhsize; - lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); + lockmgr(vp->v_vnlock, LK_EXCLUSIVE | LK_NOWITNESS, NULL); error = insmntque(vp, mntp); if (error != 0) { *npp = NULL; Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Mon Sep 14 13:16:16 2009 (r197191) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Mon Sep 14 15:16:17 2009 (r197192) @@ -232,7 +232,7 @@ nfscl_nget(struct mount *mntp, struct vn */ VN_LOCK_AREC(vp); VN_LOCK_ASHARE(vp); - lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); + lockmgr(vp->v_vnlock, LK_EXCLUSIVE | LK_NOWITNESS, NULL); error = insmntque(vp, mntp); if (error != 0) { *npp = NULL; Modified: stable/8/sys/nfsclient/nfs_node.c ============================================================================== --- stable/8/sys/nfsclient/nfs_node.c Mon Sep 14 13:16:16 2009 (r197191) +++ stable/8/sys/nfsclient/nfs_node.c Mon Sep 14 15:16:17 2009 (r197192) @@ -158,7 +158,7 @@ nfs_nget(struct mount *mntp, nfsfh_t *fh 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); + lockmgr(vp->v_vnlock, LK_EXCLUSIVE | LK_NOWITNESS, NULL); 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?200909141516.n8EFGHRO058408>