diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-18 05:57:34 +0100 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2023-12-22 11:18:14 +0530 |
commit | a39f5ccc30d5a00b7e6d921aa387ad17d1e6d168 (patch) | |
tree | 3329c4dc6795a7b75c7062a5dba45ce940a389ab /fs/xfs/xfs_rtalloc.c | |
parent | 3abfe6c2759e2e3000b13f8ce8a1a325e80987a1 (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index be93542827cf..4b8fc8e510ac 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -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; } |