[PATCH] fuse: fix conversion of fuse_reverse_inval_entry() to start_removing()
Miklos Szeredi
miklos at szeredi.hu
Tue Dec 2 08:46:41 UTC 2025
On Mon, 1 Dec 2025 at 18:08, Al Viro <viro at zeniv.linux.org.uk> 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
More information about the Linux-security-module-archive
mailing list