]> www.infradead.org Git - users/jedix/linux-maple.git/commit
md/md-bitmap: simplify md_bitmap_create() + md_bitmap_load()
authorYu Kuai <yukuai3@huawei.com>
Mon, 26 Aug 2024 07:44:22 +0000 (15:44 +0800)
committerSong Liu <song@kernel.org>
Tue, 27 Aug 2024 17:14:15 +0000 (10:14 -0700)
commit7545d385ec7e4c0d5e86e7cde4fe3fb8f4555fb9
tree5ba7f4a1d188c7ca8feaf6509a1a05101eca60c4
parent7add9db6ba3e9bd12d2be97abbc13f3881a515db
md/md-bitmap: simplify md_bitmap_create() + md_bitmap_load()

Other than internal api get_bitmap_from_slot(), all other places will
set returned bitmap to mddev->bitmap. So move the setting of
mddev->bitmap into md_bitmap_create() to simplify code.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240826074452.1490072-13-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md-bitmap.c
drivers/md/md-bitmap.h
drivers/md/md.c