[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120607015410.GG30000@ZenIV.linux.org.uk>
Date: Thu, 7 Jun 2012 02:54:10 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Miklos Szeredi <mszeredi@...e.cz>, Jan Kara <jack@...e.cz>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: processes hung after sys_renameat, and 'missing' processes
On Wed, Jun 06, 2012 at 06:45:35PM -0700, Linus Torvalds wrote:
> On Wed, Jun 6, 2012 at 6:31 PM, Al Viro <viro@...iv.linux.org.uk> 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?
Root of the filesystem - never; root of disconnected subtree - sure,
that's how they become connected to the tree. See d_materialize_unique(),
for example...
BTW, I really need more coffee - those checks belong in __d_move(),
not d_move(); aforementioned d_materialize_unique() doesn't use d_move(),
it calls __d_move() directly. Sorry.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists