--- /dev/null
+From df8629af293493757beccac2d3168fe5a315636e Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Wed, 11 Nov 2020 17:22:32 +0100
+Subject: fuse: always revalidate if exclusive create
+
+From: Miklos Szeredi <mszeredi@redhat.com>
+
+commit df8629af293493757beccac2d3168fe5a315636e upstream.
+
+Failure to do so may result in EEXIST even if the file only exists in the
+cache and not in the filesystem.
+
+The atomic nature of O_EXCL mandates that the cached state should be
+ignored and existence verified anew.
+
+Reported-by: Ken Schalk <kschalk@nvidia.com>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Wu Bo <bo.wu@vivo.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/dir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/fuse/dir.c
++++ b/fs/fuse/dir.c
+@@ -205,7 +205,7 @@ static int fuse_dentry_revalidate(struct
+ if (inode && fuse_is_bad(inode))
+ goto invalid;
+ else if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) ||
+- (flags & LOOKUP_REVAL)) {
++ (flags & (LOOKUP_EXCL | LOOKUP_REVAL))) {
+ struct fuse_entry_out outarg;
+ FUSE_ARGS(args);
+ struct fuse_forget_link *forget;
vfs-fix-copy_file_range-regression-in-cross-fs-copies.patch
vfs-fix-copy_file_range-averts-filesystem-freeze-protection.patch
nfp-fix-use-after-free-in-area_cache_get.patch
+fuse-always-revalidate-if-exclusive-create.patch