author: Amir Goldstein <amir73il@gmail.com> 2021-06-21 14:03:53 +0300
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-20 16:00:24 +0200
commit: c09a4ad6251f9354df0915ac5b8f22c7b9d6bc11
parent: 6ba041fc3c441e0cf4762f4baf0166e8d34f6802
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 93d28dc1f572..cf16d6d3a603 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -350,8 +350,8 @@ retry:
inode->i_generation = generation;
fuse_init_inode(inode, attr);
unlock_new_inode(inode);
- } else if (inode_wrong_type(inode, attr->mode)) {
- /* Inode has changed type, any I/O on the old should fail */
+ } else if (fuse_stale_inode(inode, generation, attr)) {
+ /* nodeid was reused, any I/O on the old inode should fail */
fuse_make_bad(inode);
iput(inode);
goto retry;