]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 17 Sep 2020 14:16:02 +0000 (10:16 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 17 Sep 2020 14:16:02 +0000 (10:16 -0400)
Source kernel commit: d0c20d38af135b2b4b90aa59df7878ef0c8fbef4

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c

index a6df058f97c2872d6a0176ca03f8170c0e8ecbf0..a9c1536718afe8c8632d0ee4e1fe0dbbc1f8e30e 100644 (file)
@@ -6219,7 +6219,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))