From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dominique Martinet <asmadeus@codewreck.org>,
Hugh Dickins <hughd@google.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Dominique Martinet <dominique.martinet@cea.fr>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
David Howells <dhowells@redhat.com>
Subject: Re: [git pull] vfs.git spurious ENOTDIR fix
Date: Sat, 1 Aug 2015 17:57:44 -0700 [thread overview]
Message-ID: <CA+55aFymnDY+kYeNY9Xak9kFGbJr5AMVVPGA0RzENoTVSumLJw@mail.gmail.com> (raw)
In-Reply-To: <20150802002318.GZ17109@ZenIV.linux.org.uk>
On Sat, Aug 1, 2015 at 5:23 PM, Al Viro <viro@zeniv.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
next prev parent reply other threads:[~2015-08-02 0:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 17:46 v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-07-31 17:59 ` Dominique Martinet
2015-07-31 18:00 ` J. Bruce Fields
2015-07-31 18:42 ` Linus Torvalds
2015-07-31 19:42 ` Hugh Dickins
2015-07-31 20:50 ` Dominique Martinet
2015-07-31 22:52 ` Linus Torvalds
2015-08-01 0:20 ` Hugh Dickins
2015-08-01 5:58 ` Dominique Martinet
2015-08-01 7:26 ` Al Viro
2015-08-01 10:19 ` Dominique Martinet
2015-08-01 10:50 ` Dominique Martinet
2015-08-01 16:09 ` Linus Torvalds
2015-08-01 17:09 ` Al Viro
2015-08-02 0:14 ` [git pull] vfs.git spurious ENOTDIR fix Al Viro
2015-08-02 0:23 ` Al Viro
2015-08-02 0:42 ` Linus Torvalds
2015-08-02 0:57 ` Linus Torvalds [this message]
2015-08-02 1:41 ` Al Viro
2015-08-02 2:39 ` Linus Torvalds
2015-08-02 4:06 ` Hugh Dickins
2015-08-02 4:39 ` Al Viro
2015-08-02 4:42 ` Linus Torvalds
2015-08-02 18:53 ` Hugh Dickins
2015-08-01 0:09 ` v4.2-rc dcache regression, probably 75a6f82a0d10 Hugh Dickins
2015-08-01 4:20 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+55aFymnDY+kYeNY9Xak9kFGbJr5AMVVPGA0RzENoTVSumLJw@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=asmadeus@codewreck.org \
--cc=bfields@fieldses.org \
--cc=dhowells@redhat.com \
--cc=dominique.martinet@cea.fr \
--cc=hughd@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).