ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple
authorKemeng Shi <shikemeng@huaweicloud.com>
Fri, 3 Mar 2023 17:21:20 +0000 (01:21 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Apr 2023 05:13:12 +0000 (01:13 -0400)
commit253cacb0de89235673ad5889d61f275a73dbee79
treecef63f1cf41d29498ed0f902a8ef67eb8dbc204a
parent46825e949057481ccb1f0e52c512fd52f1938cb3
ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple

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: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230303172120.3800725-21-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c