public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] EOPENSTALE handling in path_openat()
@ 2025-01-19  5:39 Al Viro
  2025-01-21 12:07 ` Miklos Szeredi
  0 siblings, 1 reply; 4+ messages in thread
From: Al Viro @ 2025-01-19  5:39 UTC (permalink / raw)
  To: linux-fsdevel

	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??

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-23 10:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-19  5:39 [RFC] EOPENSTALE handling in path_openat() Al Viro
2025-01-21 12:07 ` Miklos Szeredi
2025-01-23  2:03   ` Al Viro
2025-01-23 10:16     ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox