On Sat, 2024-05-11 at 20:28 +0100, Al Viro wrote: > On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote: > > > so we have another level of locking going on, and my patch only > > moved > > the dcache pruning outside the lock of the directory we're removing > > (not outside the lock of the directory that contains the removed > > directory). > > > > 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. Couldn't you obviate this by doing it from a workqueue? Even if the directory is recreated, the chances are most of the negative dentries that were under it will still exist and be removable by the time the workqueue runs. James