From: Darrick J. Wong Date: Mon, 15 Apr 2024 23:07:44 +0000 (-0700) Subject: xfs: fix backwards logic in xfs_bmap_alloc_account X-Git-Tag: v6.8.0~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26da39996aa4f933315a41ae9860755e2d3fa488;p=thirdparty%2Fxfsprogs-dev.git xfs: fix backwards logic in xfs_bmap_alloc_account 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" Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R Reviewed-by: Bill O'Donnell --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 5e6a5e1f..494994d3 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -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) {