From: Kent Overstreet Date: Fri, 28 Mar 2025 16:01:41 +0000 (-0400) Subject: bcachefs: fix logging in journal_entry_err_msg() X-Git-Tag: v6.15-rc1~83^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b1e0b9e182e4f2117a1c72947d4ab26f43533d8;p=thirdparty%2Flinux.git bcachefs: fix logging in journal_entry_err_msg() We want to log errors all at once, not spread across multiple printks. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 4ed6137f04394..bce4fa2648a28 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -308,8 +308,8 @@ static void journal_entry_err_msg(struct printbuf *out, break; \ case WRITE: \ bch2_sb_error_count(c, BCH_FSCK_ERR_##_err); \ - bch_err(c, "corrupt metadata before write: %s\n", _buf.buf);\ - if (bch2_fs_inconsistent(c)) { \ + if (bch2_fs_inconsistent(c, \ + "corrupt metadata before write: %s\n", _buf.buf)) {\ ret = -BCH_ERR_fsck_errors_not_fixed; \ goto fsck_err; \ } \