[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174786677693.1383760.5102016357729108965.stgit@frogsfrogsfrogs>
Date: Wed, 21 May 2025 15:37:00 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: [PATCH 08/29] fuse2fs: flip parameter order in __translate_error
From: Darrick J. Wong <djwong@...nel.org>
Flip the parameter order in __translate_error so that it matches
translate_error. I wasted too much time debugging a memory corruption
that happened because I converted translate_error to __translate_error
when developing the next patch and the compiler didn't warn me about
mismatched types.
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 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 74f1ca81aebc61..e60065402a0a43 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -173,9 +173,9 @@ struct fuse2fs {
return translate_error(global_fs, 0, EXT2_ET_BAD_MAGIC); \
} while (0)
-static int __translate_error(ext2_filsys fs, errcode_t err, ext2_ino_t ino,
+static int __translate_error(ext2_filsys fs, ext2_ino_t ino, errcode_t err,
const char *file, int line);
-#define translate_error(fs, ino, err) __translate_error((fs), (err), (ino), \
+#define translate_error(fs, ino, err) __translate_error((fs), (ino), (err), \
__FILE__, __LINE__)
/* for macosx */
@@ -4164,7 +4164,7 @@ int main(int argc, char *argv[])
return ret;
}
-static int __translate_error(ext2_filsys fs, errcode_t err, ext2_ino_t ino,
+static int __translate_error(ext2_filsys fs, ext2_ino_t ino, errcode_t err,
const char *file, int line)
{
struct timespec now;
Powered by blists - more mailing lists