xfs: remove XFS_RTMIN/XFS_RTMAX

Use the kernel min/max helpers instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
This commit is contained in:
Christoph Hellwig
2023-12-18 05:57:34 +01:00
committed by Chandan Babu R
parent 3abfe6c275
commit a39f5ccc30
3 changed files with 8 additions and 13 deletions

View File

@@ -638,9 +638,10 @@ xfs_rtallocate_extent_size(
* for this summary level.
*/
for (l = xfs_highbit32(maxlen); l >= xfs_highbit32(minlen); l--) {
error = xfs_rtalloc_sumlevel(args, l, XFS_RTMAX(minlen, 1 << l),
XFS_RTMIN(maxlen, (1 << (l + 1)) - 1), prod,
len, rtx);
error = xfs_rtalloc_sumlevel(args, l,
max_t(xfs_rtxlen_t, minlen, 1 << l),
min_t(xfs_rtxlen_t, maxlen, (1 << (l + 1)) - 1),
prod, len, rtx);
if (error != -ENOSPC)
return error;
}