From: Darrick J. Wong Date: Wed, 21 Dec 2022 00:53:34 +0000 (-0800) Subject: xfs_db: fix dir3 block magic check X-Git-Tag: origin/for-next_2022-12-29^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7374f58bfeb38467bab6552a47a5cd6bbe3c2e2e;p=thirdparty%2Fxfsprogs-dev.git xfs_db: fix dir3 block magic check Fix this broken check, which (amazingly) went unnoticed until I cranked up the warning level /and/ built the system for s390x. Fixes: e96864ff4d4 ("xfs_db: enable blockget for v5 filesystems") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- diff --git a/db/check.c b/db/check.c index bb27ce580..964756d0a 100644 --- a/db/check.c +++ b/db/check.c @@ -2578,7 +2578,7 @@ process_data_dir_v2( error++; } if ((be32_to_cpu(data->magic) == XFS_DIR2_BLOCK_MAGIC || - be32_to_cpu(data->magic) == XFS_DIR2_BLOCK_MAGIC) && + be32_to_cpu(data->magic) == XFS_DIR3_BLOCK_MAGIC) && stale != be32_to_cpu(btp->stale)) { if (!sflag || v) dbprintf(_("dir %lld block %d bad stale tail count %d\n"),