[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175182663059.1984706.11656403223439904537.stgit@frogsfrogsfrogs>
Date: Sun, 06 Jul 2025 11:32:03 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: [PATCH 5/8] fuse2fs: don't truncate when creating a new file
From: Darrick J. Wong <djwong@...nel.org>
New files can't have contents, so there's no need to truncate them,
which then messes with ctime/mtime.
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 0e9576b6ca6aa7..5b866aed98237f 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3376,6 +3376,7 @@ static int op_create(const char *path, mode_t mode, struct fuse_file_info *fp)
if (ret)
goto out2;
+ fp->flags &= ~O_TRUNC;
ret = __op_open(ff, path, fp);
if (ret)
goto out2;
Powered by blists - more mailing lists