[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175797569781.245695.5266717490613586824.stgit@frogsfrogsfrogs>
Date: Mon, 15 Sep 2025 15:40:04 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: [PATCH 09/12] fuse2fs: don't update atime when reading executable
file content
From: Darrick J. Wong <djwong@...nel.org>
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: <linux-ext4@...r.kernel.org> # v1.43
Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs")
Signed-off-by: "Darrick J. Wong" <djwong@...nel.org>
---
misc/fuse2fs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index b5b860466742d2..a075e3055bd743 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 @@ static int op_read(const char *path EXT2FS_ATTR((unused)), char *buf,
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;
Powered by blists - more mailing lists