Skip to content

Commit e774b2e

Browse files
author
Darrick J. Wong
committed
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>
1 parent 7d7d6d2 commit e774b2e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

fs/xfs/libxfs/xfs_rmap.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ xfs_rmap_check_irec(
254254
if (!is_inode && (is_bmbt || is_unwritten || is_attr))
255255
return __this_address;
256256

257+
/* Check for a valid fork offset, if applicable. */
258+
if (is_inode && !is_bmbt &&
259+
!xfs_verify_fileext(mp, irec->rm_offset, irec->rm_blockcount))
260+
return __this_address;
261+
257262
return NULL;
258263
}
259264

0 commit comments

Comments
 (0)