Re: [PATCH 3/8] spufs: switch to locked_recursive_removal()

Christian Brauner
2025-06-17T11:25:57Z

On Mon, Jun 16, 2025 at 08:14:58PM +0100, Al Viro wrote:
> On Mon, Jun 16, 2025 at 04:40:14PM +0200, Christian Brauner wrote:
> > On Sat, Jun 14, 2025 at 07:02:25AM +0100, Al Viro wrote:
> > > ... and fix an old deadlock on spufs_mkdir() failures to populate
> > > subdirectory - spufs_rmdir() had always been taking lock on the
> > > victim, so doing it while the victim is locked is a bad idea.
> > >
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > > ---
> >
> > Fwiw, I think simple_recursive_removal_locked() might be better.
> > It's longer and arguably uglier but it clearer communicates that its the
> > same helper as simple_recursive_removal() just with the assumption that
> > the caller already holds the lock.
>
> Not sure... TBH, I'm somewhat tempted to rename simple_recursive_removal()
> to simple_remove()...

Sounds good.