From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 14:44:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 845FAD19; Thu, 25 Dec 2014 14:44:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707481ABE; Thu, 25 Dec 2014 14:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBPEi5OT047533; Thu, 25 Dec 2014 14:44:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBPEi5Sd047532; Thu, 25 Dec 2014 14:44:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201412251444.sBPEi5Sd047532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 25 Dec 2014 14:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276200 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 14:44:05 -0000 Author: rmacklem Date: Thu Dec 25 14:44:04 2014 New Revision: 276200 URL: https://svnweb.freebsd.org/changeset/base/276200 Log: Fix the comment introduced in r276192 so that it clearly states that the change is needed to avoid a deadlock. Suggested by: kib MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Dec 25 13:38:51 2014 (r276199) +++ head/sys/kern/vfs_default.c Thu Dec 25 14:44:04 2014 (r276200) @@ -407,9 +407,10 @@ vop_stdadvlock(struct vop_advlock_args * vp = ap->a_vp; if (ap->a_fl->l_whence == SEEK_END) { /* - * The NFSv4 server will LOR/deadlock if a vn_lock() call - * is done on vp. Fortunately, vattr.va_size is only - * needed for SEEK_END and the NFSv4 server only uses SEEK_SET. + * The NFSv4 server must avoid doing a vn_lock() here, since it + * can deadlock the nfsd threads, due to a LOR. Fortunately + * the NFSv4 server always uses SEEK_SET and this code is + * only required for the SEEK_END case. */ vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);