Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759403Ab2FGBnT (ORCPT ); Wed, 6 Jun 2012 21:43:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1331 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754251Ab2FGBnR (ORCPT ); Wed, 6 Jun 2012 21:43:17 -0400 Date: Wed, 6 Jun 2012 21:42:47 -0400 From: Dave Jones To: Al Viro Cc: Linus Torvalds , Linux Kernel , Miklos Szeredi , Jan Kara , Peter Zijlstra Subject: Re: processes hung after sys_renameat, and 'missing' processes Message-ID: <20120607014247.GC17566@redhat.com> Mail-Followup-To: Dave Jones , Al Viro , Linus Torvalds , Linux Kernel , Miklos Szeredi , Jan Kara , Peter Zijlstra References: <20120606194233.GA1537@redhat.com> <20120606230040.GA18089@redhat.com> <20120606235403.GC30000@ZenIV.linux.org.uk> <20120607002914.GB22223@redhat.com> <20120607011915.GA17566@redhat.com> <20120607012900.GE30000@ZenIV.linux.org.uk> <20120607013149.GF30000@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120607013149.GF30000@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1431 Lines: 35 On Thu, Jun 07, 2012 at 02:31:49AM +0100, Al Viro wrote: > On Thu, Jun 07, 2012 at 02:29:00AM +0100, Al Viro wrote: > > On Wed, Jun 06, 2012 at 09:19:15PM -0400, Dave Jones wrote: > > > On Wed, Jun 06, 2012 at 05:42:35PM -0700, Linus Torvalds wrote: > > > > > > > So Al meant you to test mutex_is_locked(dentry->d_inode->i_mutex) of > > > > the parents. > > > > > > ok, I ended up with.. > > > > > > WARN_ON_ONCE(!mutex_is_locked(&target->d_parent->d_inode->i_mutex)); > > > > > > if (dentry->d_parent != NULL) > > != dentry) > > > > ->d_parent *never* should be NULL; when dentry is disconnected from the > > tree (or hadn't been connected to it yet), it points to that dentry itself. > > And you want to check i_mutex on old parent, not the file being moved > itself. IOW, the second one should be > > if (dentry->d_parent != dentry) > WARN_ON_ONCE(!mutex_is_locked(&dentry->d_parent->d_inode->i_mutex)); ok, now that you've both found one per in every line I've written tonight, things seem to have booted without incident. I'll rerun the tests, and get back to you if/when they start spewing anything interesting. Dave -- 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/