On Thu, Nov 23, 2023 at 11:36:22AM +0100, Jan Kara wrote: > It would look more natural to me if s_vfs_rename_mutex got dropped in the > callers (lock_rename(), lock_rename_child()) which have acquired the lock > instead of here. I agree it results in a bit more boiler plate code though. finish_locking_two_parents(), perhaps? ;-) Seriously, though - it starts with ->s_vfs_rename_mutex and ends with the environment for vfs_rename() or with all locks dropped.