summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-09 09:24:07 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:11 +0300
commit319f9ac38eaba628d69b6ddbf402b35487315fc1 (patch)
tree01daddd4881b1f09bb4d50087e8b8803e59fea35 /fs/bcachefs/journal_io.c
parent75369d4ec3d2dfc52af18a2d20cd0af14c935ac9 (diff)
downloadlinux-319f9ac38eaba628d69b6ddbf402b35487315fc1.tar.xz
bcachefs: revamp to_text methods
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index eb2fbe235483..4555d55b23dd 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -146,7 +146,6 @@ static int journal_validate_key(struct bch_fs *c, struct jset *jset,
{
void *next = vstruct_next(entry);
const char *invalid;
- char buf[160];
int ret = 0;
if (journal_entry_err_on(!k->k.u64s, c,
@@ -179,8 +178,10 @@ static int journal_validate_key(struct bch_fs *c, struct jset *jset,
invalid = bch2_bkey_invalid(c, key_type, bkey_i_to_s_c(k));
if (invalid) {
- bch2_bkey_val_to_text(c, key_type, buf, sizeof(buf),
- bkey_i_to_s_c(k));
+ char buf[160];
+
+ bch2_bkey_val_to_text(&PBUF(buf), c, key_type,
+ bkey_i_to_s_c(k));
mustfix_fsck_err(c, "invalid %s in journal: %s\n%s",
type, invalid, buf);