On Fri, 12 Sep 2025, Al Viro wrote: > On Tue, Sep 09, 2025 at 02:43:15PM +1000, NeilBrown wrote: > > > Note that instead of always getting an exclusive lock, ovl now only gets > > a shared lock, and only sometimes. The exclusive lock was never needed. > > what it is the locking environment in callers and what stabilizes > that list hanging off rdd, seeing that you now run through it without > having dir held exclusive? rdd is per-thread - always allocated on the stack. In this case an iterate_dir() call has built a cache of a directory and the maybe_whiteout and been constructed of everything that is DT_CHR. Now, outside the readdir lock, we are lookup up each of those to check if they are really whiteouts. So no other thread can tough this list at all. Thanks, NeilBrown