To simplify crash recovery and reduce performance impact, backing_ids are not persisted across daemon restarts. However, when the daemon restarts and another process open the same FUSE file and assigning it the same backing file (with the same inode) will also cause the fuse_inode_uncached_io_start() function to fail due to a mismatch in the fb pointer. So Relax the validation in fuse_inode_uncached_io_start() to compare backing inodes instead of fuse_backing pointers. Signed-off-by: Chunsheng Luo --- fs/fuse/iomode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/iomode.c b/fs/fuse/iomode.c index 3728933188f3..ca7619958b0d 100644 --- a/fs/fuse/iomode.c +++ b/fs/fuse/iomode.c @@ -90,7 +90,7 @@ int fuse_inode_uncached_io_start(struct fuse_inode *fi, struct fuse_backing *fb) spin_lock(&fi->lock); /* deny conflicting backing files on same fuse inode */ oldfb = fuse_inode_backing(fi); - if (fb && oldfb && oldfb != fb) { + if (fb && oldfb && file_inode(oldfb->file) != file_inode(fb->file)) { err = -EBUSY; goto unlock; } -- 2.43.0