xfs: fix backwards logic in xfs_bmap_alloc_account
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jan 2024 02:17:34 +0000 (18:17 -0800)
committerChandan Babu R <chandanbabu@kernel.org>
Thu, 11 Jan 2024 05:04:01 +0000 (10:34 +0530)
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>
fs/xfs/libxfs/xfs_bmap.c

index 98aaca933bddb76f62b7927576f5d560ebd61c84..f362345467facd57cc314547142e1093b4e54983 100644 (file)
@@ -3277,7 +3277,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) {