]> git.itanic.dy.fi Git - linux-stable/commit
xfs: reorder the minlen and prod calculations in xfs_bmap_rtalloc
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Dec 2023 04:57:35 +0000 (05:57 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Fri, 22 Dec 2023 05:48:15 +0000 (11:18 +0530)
commit26e5eed7802299a666714ee511da58d906e8770c
tree6662bd15fef4842e3cd2df5770b7285e83bc6157
parenta39f5ccc30d5a00b7e6d921aa387ad17d1e6d168
xfs: reorder the minlen and prod calculations in xfs_bmap_rtalloc

xfs_bmap_rtalloc is a bit of a mess in terms of calculating the locally
need variables.  Reorder them a bit so that related code is located
next to each other - the raminlen calculation moves up next to where
the maximum len is calculated, and all the prod calculation is move
into a single place and rearranged so that the real prod calculation
only happens when it actually is needed.

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>
fs/xfs/xfs_rtalloc.c