On Sat Nov 23 08:35:12 2024 +0000, Jinoh Kang wrote:
(Interim comment) How about we just unconditionally call `fstat` here? `src_st_filled` looks error-prone anyway.
I don't think that's an improvement if we consider this patch. Right now it's called only in "rarer-than-typical" cases, making it unconditionally might be worse because, even though it's called only once, it will be called on every rename (even typical cases).
How about a helper that functions the same way but caches the result so it only fstats once? That would be almost same as now in complexity while avoiding extra calls.