From: Darrick J. Wong Date: Thu, 21 Nov 2024 00:24:27 +0000 (-0800) Subject: libxfs: use correct rtx count to block count conversion X-Git-Tag: v6.13.0~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b15a12d4205091c12f3f923e4372626af8af2bdc;p=thirdparty%2Fxfsprogs-dev.git libxfs: use correct rtx count to block count conversion Fix a place where we use the wrong conversion functions to convert between a number of rt extents and a number of rt blocks. This isn't really necessary since userspace cannot allocate rt extents, but let's not leave a logic bomb. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/trans.c b/libxfs/trans.c index 01834eff..5c896ba1 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -1202,7 +1202,7 @@ libxfs_trans_alloc_inode( int error; error = libxfs_trans_alloc(mp, resv, dblocks, - xfs_rtb_to_rtx(mp, rblocks), + xfs_extlen_to_rtxlen(mp, rblocks), force ? XFS_TRANS_RESERVE : 0, &tp); if (error) return error;