From owner-svn-src-all@FreeBSD.ORG Thu Jun 3 10:20:09 2010 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 482331065672; Thu, 3 Jun 2010 10:20:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37DFA8FC15; Thu, 3 Jun 2010 10:20:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o53AK9Od043311; Thu, 3 Jun 2010 10:20:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o53AK9uM043309; Thu, 3 Jun 2010 10:20:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006031020.o53AK9uM043309@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 3 Jun 2010 10:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208773 - head/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: Thu, 03 Jun 2010 10:20:09 -0000 Author: kib Date: Thu Jun 3 10:20:08 2010 New Revision: 208773 URL: http://svn.freebsd.org/changeset/base/208773 Log: Sometimes vnodes share the lock despite being different vnodes on different mount points, e.g. the nullfs vnode and the covered vnode from the lower filesystem. In this case, existing assertion in vop_rename_pre() may be triggered. Check for vnode locks equiality instead of the vnodes itself to not trip over the situation. Submitted by: Mikolaj Golub Tested by: pho MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Jun 3 10:11:45 2010 (r208772) +++ head/sys/kern/vfs_subr.c Thu Jun 3 10:20:08 2010 (r208773) @@ -3793,9 +3793,10 @@ vop_rename_pre(void *ap) ASSERT_VI_UNLOCKED(a->a_fdvp, "VOP_RENAME"); /* Check the source (from). */ - if (a->a_tdvp != a->a_fdvp && a->a_tvp != a->a_fdvp) + if (a->a_tdvp->v_vnlock != a->a_fdvp->v_vnlock && + (a->a_tvp == NULL || a->a_tvp->v_vnlock != a->a_fdvp->v_vnlock)) ASSERT_VOP_UNLOCKED(a->a_fdvp, "vop_rename: fdvp locked"); - if (a->a_tvp != a->a_fvp) + if (a->a_tvp == NULL || a->a_tvp->v_vnlock != a->a_fvp->v_vnlock) ASSERT_VOP_UNLOCKED(a->a_fvp, "vop_rename: fvp locked"); /* Check the target. */