From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Subject: [RFC] EOPENSTALE handling in path_openat()
Date: Sun, 19 Jan 2025 05:39:56 +0000 [thread overview]
Message-ID: <20250119053956.GX1977892@ZenIV> (raw)
We have something very odd in the end of path_openat():
if (error == -EOPENSTALE) {
if (flags & LOOKUP_RCU)
error = -ECHILD;
else
error = -ESTALE;
}
Note that *nothing* that may return EOPENSTALE is ever called in
RCU mode, pretty much by definition - we must have done something
blocking to have gotten that and in RCU mode that's not going to
happen.
This check does not look for RCU mode, though - it checks whether
we'd *started* in RCU mode, ignoring any successful unlazy that
might have landed us in non-RCU mode. So this ECHILD is not
a dead code.
It really looks like it ought to have been - there's nothing
a retry in non-RCU mode would have solved; the checks on ->d_seq
should've guaranteed that there had been possible timings for
just that tree traversal in non-RCU mode, hitting exact same
dentries. If they hadn't, we have a much worse problem there...
Miklos, could you recall what was the original intent of that?
Do we want to keep that logics there, or should it just turn into
"map -ENOPENSTALE to -ESTALE??
next reply other threads:[~2025-01-19 5:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-19 5:39 Al Viro [this message]
2025-01-21 12:07 ` [RFC] EOPENSTALE handling in path_openat() Miklos Szeredi
2025-01-23 2:03 ` Al Viro
2025-01-23 10:16 ` Miklos Szeredi
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=20250119053956.GX1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
/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