Re: [PATCH 2/8] add locked_recursive_removal()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 14, 2025 at 07:02:24AM +0100, Al Viro wrote:
> simple_recursive_removal() assumes that parent is not locked and
> locks it when it finally gets to removing the victim itself.
> Usually that's what we want, but there are places where the
> parent is *already* locked and we need it to stay that way.
> In those cases simple_recursive_removal() would, of course,
> deadlock, so we have to play racy games with unlocking/relocking
> the parent around the call or open-code the entire thing.
> 
> A better solution is to provide a variant that expects to
> be called with the parent already locked by the caller.
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux