Re: [PATCH] fuse: fix conversion of fuse_reverse_inval_entry() to start_removing()

From: Miklos Szeredi

Date: Tue Dec 02 2025 - 03:47:20 EST


On Mon, 1 Dec 2025 at 18:08, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> Then as far as VFS is concerned, it's an equivalent of "we'd done
> a dcache lookup and revalidate told us to bugger off", which does
> *not* need locking the parent - the same sequence can very well
> happen without touching any inode locks.

Okay.

> IOW, from the point of view of locking protocol changes that's not
> a removal at all.
>
> Or do you need them serialized for fuse-internal purposes?

Not as far as I can see. As to any fuse filesystem being reliant on
this behavior, I think that's unlikely, though it's sort of documented
in the libfuse APIs as:

* To avoid a deadlock this function must not be called in the
* execution path of a related filesystem operation or within any code
* that could hold a lock that could be needed to execute such an
* operation. As of kernel 4.18, a "related operation" is a lookup(),
* symlink(), mknod(), mkdir(), unlink(), rename(), link() or create()
* request for the parent, and a setattr(), unlink(), rmdir(),
* rename(), setxattr(), removexattr(), readdir() or readdirplus()
* request for the inode itself.

Why the locking was added in the first place? Oversight, probably.

Thanks,
Miklos