Commit db26ff92 authored by Kemeng Shi's avatar Kemeng Shi Committed by Greg Kroah-Hartman
Browse files

ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple



[ Upstream commit 253cacb0 ]

We try to allocate a block from goal in ext4_mb_new_blocks_simple. We
only need get blkoff in first group with goal and set blkoff to 0 for
the rest groups.

Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230303172120.3800725-21-shikemeng@huaweicloud.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Stable-dep-of: 3f4830ab ("ext4: fix potential unnitialized variable")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 33feac2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment