xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 2 Sep 2020 17:47:02 +0000 (10:47 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 3 Sep 2020 15:33:50 +0000 (08:33 -0700)
The realtime flag only applies to the data fork, so don't use the
realtime block number checks on the attr fork of a realtime file.

Fixes: 30b0984d9117 ("xfs: refactor bmap record validation")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/libxfs/xfs_bmap.c

index 9c40d597103570d834450a9da177cd8cd4dd4635..1b0a01b06a05d13b4f3cf0193dc1034e6412b9c0 100644 (file)
@@ -6226,7 +6226,7 @@ xfs_bmap_validate_extent(
 
        isrt = XFS_IS_REALTIME_INODE(ip);
        endfsb = irec->br_startblock + irec->br_blockcount - 1;
-       if (isrt) {
+       if (isrt && whichfork == XFS_DATA_FORK) {
                if (!xfs_verify_rtbno(mp, irec->br_startblock))
                        return __this_address;
                if (!xfs_verify_rtbno(mp, endfsb))