From 0f295a214bb7658ca37bd61a8a1f0cd4a9d86c1f Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Tue, 3 Sep 2013 10:06:58 +1000 Subject: [PATCH] xfs: check magic numbers in dir3 leaf verifier first Calling xfs_dir3_leaf_hdr_from_disk() in a verifier before validating the magic numbers in the buffer results in ASSERT failures due to mismatching magic numbers when a corruption occurs. Seeing as the verifier is supposed to catch the corruption and pass it back to the caller, having the verifier assert fail on error defeats the purpose of detecting the errors in the first place. Check the magic numbers direct from the buffer before decoding the header. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Ben Myers --- Reading git-format-patch failed