xfs: hoist rmap record flag checks from scrub
Move the rmap record flag checks from xchk_rmapbt_rec into xfs_rmap_check_irec so that they are applied everywhere. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
7d7d6d2fd0
commit
e774b2ea0b
|
@ -254,6 +254,11 @@ xfs_rmap_check_irec(
|
|||
if (!is_inode && (is_bmbt || is_unwritten || is_attr))
|
||||
return __this_address;
|
||||
|
||||
/* Check for a valid fork offset, if applicable. */
|
||||
if (is_inode && !is_bmbt &&
|
||||
!xfs_verify_fileext(mp, irec->rm_offset, irec->rm_blockcount))
|
||||
return __this_address;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue