From owner-svn-src-stable-9@FreeBSD.ORG Wed Mar 7 08:02:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF611065673; Wed, 7 Mar 2012 08:02:44 +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 493608FC0C; Wed, 7 Mar 2012 08:02:44 +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 q2782iHR081995; Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2782iQ6081993; Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070802.q2782iQ6081993@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232644 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:02:44 -0000 Author: kib Date: Wed Mar 7 08:02:43 2012 New Revision: 232644 URL: http://svn.freebsd.org/changeset/base/232644 Log: MFC r232301: Always request exclusive lock for the lower vnode in nullfs_vget(). The null_nodeget() requires exclusive lock on lowervp to be able to insmntque() new vnode. Modified: stable/9/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 07:59:30 2012 (r232643) +++ stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 08:02:43 2012 (r232644) @@ -307,6 +307,12 @@ nullfs_vget(mp, ino, flags, vpp) struct vnode **vpp; { int error; + + KASSERT((flags & LK_TYPE_MASK) != 0, + ("nullfs_vget: no lock requested")); + flags &= ~LK_TYPE_MASK; + flags |= LK_EXCLUSIVE; + error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); if (error) return (error);