]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: fix backwards logic in xfs_bmap_alloc_account
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 23:07:44 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:26 +0000 (14:06 -0700)
Source kernel commit: d61b40bf15ce453f3aa71f6b423938e239e7f8f8

We're only allocating from the realtime device if the inode is marked
for realtime and we're /not/ allocating into the attr fork.

Fixes: 58643460546d ("xfs: also use xfs_bmap_btalloc_accounting for RT allocations")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
libxfs/xfs_bmap.c

index 5e6a5e1f355b28cb7b415fe73a073fb3d835ab8b..494994d360e4dc19e0b90a74536fdb0f177c8041 100644 (file)
@@ -3271,7 +3271,7 @@ xfs_bmap_alloc_account(
        struct xfs_bmalloca     *ap)
 {
        bool                    isrt = XFS_IS_REALTIME_INODE(ap->ip) &&
-                                       (ap->flags & XFS_BMAPI_ATTRFORK);
+                                       !(ap->flags & XFS_BMAPI_ATTRFORK);
        uint                    fld;
 
        if (ap->flags & XFS_BMAPI_COWFORK) {