Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759425Ab2FGBqA (ORCPT ); Wed, 6 Jun 2012 21:46:00 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:45145 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756629Ab2FGBp7 convert rfc822-to-8bit (ORCPT ); Wed, 6 Jun 2012 21:45:59 -0400 MIME-Version: 1.0 In-Reply-To: <20120607013149.GF30000@ZenIV.linux.org.uk> References: <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> <20120607012900.GE30000@ZenIV.linux.org.uk> <20120607013149.GF30000@ZenIV.linux.org.uk> From: Linus Torvalds Date: Wed, 6 Jun 2012 18:45:35 -0700 X-Google-Sender-Auth: r3VdCX7i8ImJxOaWV47c4rgOrWQ Message-ID: Subject: Re: processes hung after sys_renameat, and 'missing' processes To: Al Viro Cc: Dave Jones , 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: 931 Lines: 24 On Wed, Jun 6, 2012 at 6:31 PM, Al Viro wrote: > > 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)); Do you even need the "dentry->d_parent != dentry" test? When do we even rename root dentries? I do notice that we have that IS_ROOT() test in __d_move(), but now that I look at it I wonder *why* we have it.. Anyway, Dave, you should probably trust Al over me here - that test obviously won't hurt, even if I can't see immediately when it would trigger either. 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/