fuse: invalidate dentry on EEXIST creates or ENOENT deletes
authorJiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Tue, 11 Jul 2023 04:34:02 +0000 (12:34 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 21 Aug 2023 10:14:59 +0000 (12:14 +0200)
commit7d875e66859a4359acd29ce0d188e1aff048e7ed
tree5aee54823ebc695b43e1ee17a98ed1e887264c54
parent972f4c46d0a1bb7fde3ce0bd15775855b2d02c68
fuse: invalidate dentry on EEXIST creates or ENOENT deletes

The EEXIST errors returned from server are strong sign that a local
negative dentry should be invalidated.  Similarly, The ENOENT errors from
server can also be a sign of revalidate failure.

This commit invalidates dentries on EEXIST creates and ENOENT deletes by
calling fuse_invalidate_entry(), which improves the consistency with no
performance degradation.

Signed-off-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c