[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFymnDY+kYeNY9Xak9kFGbJr5AMVVPGA0RzENoTVSumLJw@mail.gmail.com>
Date: Sat, 1 Aug 2015 17:57:44 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Dominique Martinet <asmadeus@...ewreck.org>,
Hugh Dickins <hughd@...gle.com>,
"J. Bruce Fields" <bfields@...ldses.org>,
Dominique Martinet <dominique.martinet@....fr>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
David Howells <dhowells@...hat.com>
Subject: Re: [git pull] vfs.git spurious ENOTDIR fix
On Sat, Aug 1, 2015 at 5:23 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> Branch head should be at 97242f9, just to make sure you get
> the right one...
Ok, merged in my tree.
However, looking at this, I'm struck by how all the callers of
"link_path_walk()" tend to have very similar patterns wrt error
handling.
And I'm wondering - wouldn't it be nicer to extend that pattern a bit
more, and make the *callers* of link_path_walk() all do
if (error) {
if (nd->flags & LOOKUP_RCU) {
if (unlazy_walk(nd, NULL, 0))
error = -ECHILD;
}
}
and maybe even make that part of terminate_walk() that everybody calls
after getting here.
Because it's not just that "!d_can_lookup()" case that triggers it,
you also have that pattern in the RCU error case for may_lookup(), and
get_link().
So why don't we make the rule that *every* single error we get during
an RCU walk should do that unlazy_walk() and turn the error into
ECHILD on failure. Hmm? We're almost there as-is.
Linus
--
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