diff options
| author | Yu Kuai <yukuai3@huawei.com> | 2024-08-26 15:44:22 +0800 |
|---|---|---|
| committer | Song Liu <song@kernel.org> | 2024-08-27 10:14:15 -0700 |
| commit | 7545d385ec7e4c0d5e86e7cde4fe3fb8f4555fb9 (patch) | |
| tree | 5ba7f4a1d188c7ca8feaf6509a1a05101eca60c4 /drivers/md/md-bitmap.h | |
| parent | 7add9db6ba3e9bd12d2be97abbc13f3881a515db (diff) | |
| download | lwn-7545d385ec7e4c0d5e86e7cde4fe3fb8f4555fb9.tar.gz lwn-7545d385ec7e4c0d5e86e7cde4fe3fb8f4555fb9.zip | |
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>
Diffstat (limited to 'drivers/md/md-bitmap.h')
| -rw-r--r-- | drivers/md/md-bitmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md-bitmap.h b/drivers/md/md-bitmap.h index 14c21ab42f9e..d66f447f4be6 100644 --- a/drivers/md/md-bitmap.h +++ b/drivers/md/md-bitmap.h @@ -253,7 +253,7 @@ struct bitmap_operations { void mddev_set_bitmap_ops(struct mddev *mddev); /* these are used only by md/bitmap */ -struct bitmap *md_bitmap_create(struct mddev *mddev, int slot); +int md_bitmap_create(struct mddev *mddev, int slot); int md_bitmap_load(struct mddev *mddev); void md_bitmap_flush(struct mddev *mddev); void md_bitmap_destroy(struct mddev *mddev); |
