From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 1 15:56:15 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FA36106566B; Tue, 1 Nov 2011 15:56:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4098FC14; Tue, 1 Nov 2011 15:56:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA1FuFDx073510; Tue, 1 Nov 2011 15:56:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA1FuFAn073508; Tue, 1 Nov 2011 15:56:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111011556.pA1FuFAn073508@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 1 Nov 2011 15:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226993 - stable/8/sys/fs/nullfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2011 15:56:15 -0000 Author: kib Date: Tue Nov 1 15:56:15 2011 New Revision: 226993 URL: http://svn.freebsd.org/changeset/base/226993 Log: MFC r226688: The use of VOP_ISLOCKED() without a check for the return values can cause false positives. Replace the #ifdef block with the proper ASSERT_VOP_UNLOCKED() assert. Modified: stable/8/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/8/sys/fs/nullfs/null_vfsops.c Tue Nov 1 15:53:44 2011 (r226992) +++ stable/8/sys/fs/nullfs/null_vfsops.c Tue Nov 1 15:56:15 2011 (r226993) @@ -242,10 +242,7 @@ nullfs_root(mp, flags, vpp) vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; VREF(vp); -#ifdef NULLFS_DEBUG - if (VOP_ISLOCKED(vp)) - panic("root vnode is locked.\n"); -#endif + ASSERT_VOP_UNLOCKED(vp, "root vnode is locked"); vn_lock(vp, flags | LK_RETRY); *vpp = vp; return 0;