From owner-freebsd-fs@FreeBSD.ORG Fri Aug 5 07:30:18 2011 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44D50106564A for ; Fri, 5 Aug 2011 07:30:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 332B18FC0C for ; Fri, 5 Aug 2011 07:30:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p757UI8i069020 for ; Fri, 5 Aug 2011 07:30:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p757UHus069017; Fri, 5 Aug 2011 07:30:18 GMT (envelope-from gnats) Date: Fri, 5 Aug 2011 07:30:18 GMT Message-Id: <201108050730.p757UHus069017@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Gleb Kurtsou Cc: Subject: Re: kern/159418: [tmpfs] [panic] tmpfs kernel panic: recursing on non recursive lockmgr tmpfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gleb Kurtsou List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 07:30:18 -0000 The following reply was made to PR kern/159418; it has been noted by GNATS. From: Gleb Kurtsou To: bug-followup@FreeBSD.org, gpr@mail.ru Cc: Subject: Re: kern/159418: [tmpfs] [panic] tmpfs kernel panic: recursing on non recursive lockmgr tmpfs Date: Fri, 5 Aug 2011 09:55:50 +0300 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Could you test the patch attached. Thanks, Gleb. --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="tmpfs-rename_lock.patch.txt" --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -968,7 +968,7 @@ tmpfs_rename(struct vop_rename_args *v) /* If we need to move the directory between entries, lock the * source so that we can safely operate on it. */ - if (tdvp != fdvp) { + if (fdvp != tdvp && fdvp != tvp) { error = vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) goto out; @@ -1145,7 +1145,7 @@ tmpfs_rename(struct vop_rename_args *v) error = 0; out_locked: - if (fdnode != tdnode) + if (fdvp != tdvp && fdvp != tvp) VOP_UNLOCK(fdvp, 0); out: --UlVJffcvxoiEqYs2--