On Mon, Jun 13, 2022 at 04:07:11PM +0200, Sebastian Andrzej Siewior wrote: > __d_add() and __d_move() invoke __d_lookup_done() from within a preemption > disabled region. This violates the PREEMPT_RT constraints as the wake up > acquires wait_queue_head::lock which is a "sleeping" spinlock on RT. > > As a preparation for solving this completely, invoke __d_lookup_unhash() > from __d_add/move() and handle the wakeup there. > > This allows to move the spin_lock/unlock(dentry::lock) pair into > __d_lookup_done() which debloats the d_lookup_done() inline. It also changes calling conventions for a helper that is, unfortunately, exported. Sure, nobody outside of fs/dcache.c and d_lookup_done() is supposed to be using it. But... export is export. Rename that sucker, please - at least that way whoever's playing with it will get a build breakage.