Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759387Ab2FGBkq (ORCPT ); Wed, 6 Jun 2012 21:40:46 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:46244 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507Ab2FGBkp convert rfc822-to-8bit (ORCPT ); Wed, 6 Jun 2012 21:40:45 -0400 MIME-Version: 1.0 In-Reply-To: <20120607011915.GA17566@redhat.com> References: <20120603231709.GP30000@ZenIV.linux.org.uk> <20120603232820.GQ30000@ZenIV.linux.org.uk> <20120606194233.GA1537@redhat.com> <20120606230040.GA18089@redhat.com> <20120606235403.GC30000@ZenIV.linux.org.uk> <20120607002914.GB22223@redhat.com> <20120607011915.GA17566@redhat.com> From: Linus Torvalds Date: Wed, 6 Jun 2012 18:40:23 -0700 X-Google-Sender-Auth: U8ZSkhbnnpmRa5XPGFmLrpVNaKg Message-ID: Subject: Re: processes hung after sys_renameat, and 'missing' processes To: Dave Jones , Linus Torvalds , Al Viro , Linux Kernel , Miklos Szeredi , Jan Kara , Peter Zijlstra Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 898 Lines: 24 On Wed, Jun 6, 2012 at 6:19 PM, Dave Jones wrote: > > ok, I ended up with.. > > ? ? ? ?WARN_ON_ONCE(!mutex_is_locked(&target->d_parent->d_inode->i_mutex)); > > ? ? ? ?if (dentry->d_parent != NULL) > ? ? ? ? ? ? ? ?WARN_ON_ONCE(!mutex_is_locked(&dentry->d_inode->i_mutex)); It should just be something like WARN_ON_ONCE(!mutex_is_locked(&dentry->d_parent->d_inode->i_mutex)); WARN_ON_ONCE(!mutex_is_locked(&target->d_parent->d_inode->i_mutex)); (And doing it as two separate ones rather than one that tests both is probably a good idea, so that you see *which* one it is that triggers if they do) Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/