fs: drop the lock trip around I_NEW wake up in evict()
The unhashed state check in __wait_on_freeing_inode() performed with ->i_lock held against remove_hash_inode() also holding the lock makes another lock acquire in evict() completely spurious -- all potential sleepers already dropped the lock before remove_hash_inode() acquired it or they found the inode to be unhashed and aborted. Note there is no trickery here: the usual cost of both sides taking locks is still being paid, it just stops being paid twice. Signed-off-by:Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20250317160707.1694135-1-mjguzik@gmail.com Signed-off-by:
Christian Brauner <brauner@kernel.org>
Loading
Please register or sign in to comment