On Sat, May 11, 2024 at 12:55:29PM -0700, Linus Torvalds wrote: > On Sat, 11 May 2024 at 12:28, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > > > On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote: > > > > > > And that outside lock is the much more important one, I bet. > > > > ... and _that_ is where taking d_delete outside of the lock might > > take an unpleasant analysis of a lot of code. > > Hmm. It really shouldn't matter. There can only be negative children > of the now deleted directory, so there are no actual effects on > inodes. > > It only affects the d_child list, which is protected by d_lock (and > can be modified outside of the inode lock anyway due to memory > pressure). > > What am I missing? fsnotify and related fun, basically. I'll need to redo the analysis, but IIRC there had been places where correctness had been guaranteed by the fact that this had been serialized by the lock on parent. No idea how easy would it be to adapt to that change; I'll check, but it'll take a few days, I'm afraid.