Otherwise we get failures to validate the block on CRC enabled
filesystems.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
if (!(leafhdr.magic == XFS_DIR2_LEAF1_MAGIC ||
leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) ||
leafhdr.forw || leafhdr.back ||
- leafhdr.count < leaf->hdr.stale ||
+ leafhdr.count < leafhdr.stale ||
leafhdr.count >
xfs_dir3_max_leaf_ents(mp, leaf) ||
(char *)&ents[leafhdr.count] > (char *)bestsp) {