fuse: always revalidate rename target dentry
authorJiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Wed, 28 Sep 2022 12:19:34 +0000 (20:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2023 12:28:42 +0000 (14:28 +0200)
commit7ca973d830c0050ed8def693f7a8b2ef588b6142
tree7167fadcf5dacc4d9f9a7d923eea1457cb43bb83
parentf9a20ef5e83c4ae3a4b2deb5535b3913680768f2
fuse: always revalidate rename target dentry

commit ccc031e26afe60d2a5a3d93dabd9c978210825fb upstream.

The previous commit df8629af2934 ("fuse: always revalidate if exclusive
create") ensures that the dentries are revalidated on O_EXCL creates.  This
commit complements it by also performing revalidation for rename target
dentries.  Otherwise, a rename target file that only exists in kernel
dentry cache but not in the filesystem will result in EEXIST if
RENAME_NOREPLACE flag is used.

Signed-off-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
Signed-off-by: Zhang Tianci <zhangtianci.1997@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Yang Bo <yb203166@antfin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c