From: Darrick J. Wong Date: Wed, 21 May 2025 22:37:00 +0000 (-0700) Subject: fuse2fs: flip parameter order in __translate_error X-Git-Tag: v1.47.3-rc1~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb2a4e6cf6af196349651664767091badc3e4dd5;p=thirdparty%2Fe2fsprogs.git fuse2fs: flip parameter order in __translate_error 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@vger.kernel.org # v1.43 Fixes: 81cbf1ef4f5dab ("misc: add fuse2fs, a FUSE server for e2fsprogs") Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/174786677693.1383760.5102016357729108965.stgit@frogsfrogsfrogs Signed-off-by: Theodore Ts'o --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 2a4e77c3..39f9f2da 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -177,9 +177,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 */ @@ -4179,7 +4179,7 @@ out: 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;