From 8dad0d5805266d57f3e4587e788d20b6b56442c6 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 17 Aug 2021 15:44:31 -0400 Subject: [PATCH] debugfs: fix missing byte swap when dumping a revoke block Signed-off-by: Theodore Ts'o --- debugfs/logdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugfs/logdump.c b/debugfs/logdump.c index 6aee1a1..74b8935 100644 --- a/debugfs/logdump.c +++ b/debugfs/logdump.c @@ -721,10 +721,10 @@ static void dump_revoke_block(FILE *out_file, char *buf, header = (jbd2_journal_revoke_header_t *) buf; offset = sizeof(jbd2_journal_revoke_header_t); max = be32_to_cpu(header->r_count); - if (max > jsb->s_blocksize) { + if (max > be32_to_cpu(jsb->s_blocksize)) { fprintf(out_file, "Revoke block's r_count invalid: %u\b", max); - max = jsb->s_blocksize; + max = be32_to_cpu(jsb->s_blocksize); } while (offset < max) { -- 1.8.3.1