[PATCH 06/16] fuse2fs: only flush the cache for the file under directio read

Darrick J. Wong
2025-05-22T00:12:25Z

We only need to flush the io_channel's cache for the file that's being
read directly, not everything else.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
misc/fuse2fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index c0f868e8f01ed4..3ec99310b0f112 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -4957,7 +4957,7 @@ static int fuse_iomap_begin_read(struct fuse2fs *ff, ext2_ino_t ino,
return -ENOSYS;

/* flush dirty io_channel buffers to disk before iomap reads them */
- err = io_channel_flush(ff->fs->io);
+ err = io_channel_flush_tag(ff->fs->io, ino);
if (err)
return translate_error(ff->fs, ino, err);