From owner-svn-src-all@FreeBSD.ORG Sat Oct 25 14:01:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FA8A1065681; Sat, 25 Oct 2008 14:01:29 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6188FC28; Sat, 25 Oct 2008 14:01:29 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9PE1TXM034044; Sat, 25 Oct 2008 14:01:29 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9PE1TNK034043; Sat, 25 Oct 2008 14:01:29 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200810251401.m9PE1TNK034043@svn.freebsd.org> From: Doug Rabson Date: Sat, 25 Oct 2008 14:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184262 - in releng/6.4/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2008 14:01:29 -0000 Author: dfr Date: Sat Oct 25 14:01:29 2008 New Revision: 184262 URL: http://svn.freebsd.org/changeset/base/184262 Log: MFC: r184227 - don't use *statep without holding the vnode interlock This change is being merged earlier than originally planned at the request of the release engineers. Approved by: re (kib) Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/kern/kern_lockf.c Modified: releng/6.4/sys/kern/kern_lockf.c ============================================================================== --- releng/6.4/sys/kern/kern_lockf.c Sat Oct 25 14:01:08 2008 (r184261) +++ releng/6.4/sys/kern/kern_lockf.c Sat Oct 25 14:01:29 2008 (r184262) @@ -467,12 +467,15 @@ lf_advlockasync(struct vop_advlockasync_ /* * Avoid the common case of unlocking when inode has no locks. */ - if ((*statep) == NULL || LIST_EMPTY(&(*statep)->ls_active)) { + VI_LOCK(vp); + if ((*statep) == NULL) { if (ap->a_op != F_SETLK) { fl->l_type = F_UNLCK; + VI_UNLOCK(vp); return (0); } } + VI_UNLOCK(vp); /* * Map our arguments to an existing lock owner or create one