From: Darrick J. Wong Date: Fri, 5 Sep 2025 20:52:24 +0000 (-0700) Subject: fuse2fs: don't update atime when reading executable file content X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d211fdd8866fbd1b085f0628ce9dac9a4a80c10;p=thirdparty%2Fe2fsprogs.git fuse2fs: don't update atime when reading executable file content The kernel doesn't update the atime of program files when it's paging their content into memory, so fuse2fs shouldn't either. Found by generic/120. Cc: # v1.43 Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs") Signed-off-by: "Darrick J. Wong" --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 0f655c41..0ecdd4f9 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -207,6 +207,7 @@ struct fuse2fs_file_handle { unsigned long magic; ext2_ino_t ino; int open_flags; + int check_flags; }; /* Main program context */ @@ -2672,6 +2673,7 @@ static int __op_open(struct fuse2fs *ff, const char *path, ret = check_inum_access(ff, file->ino, X_OK); if (ret) goto out; + check = X_OK; } else goto out; } @@ -2682,6 +2684,7 @@ static int __op_open(struct fuse2fs *ff, const char *path, goto out; } + file->check_flags = check; fp->fh = (uintptr_t)file; out: @@ -2750,7 +2753,7 @@ out2: goto out; } - if (fs_writeable(fs)) { + if (fh->check_flags != X_OK && fs_writeable(fs)) { ret = update_atime(fs, fh->ino); if (ret) goto out;