diff options
| author | Yu Kuai <yukuai3@huawei.com> | 2025-07-07 09:27:04 +0800 |
|---|---|---|
| committer | Yu Kuai <yukuai3@huawei.com> | 2025-09-06 17:11:54 +0800 |
| commit | bb74b093c33cf20876e23ad8aa0d206b537ccb69 (patch) | |
| tree | daea36e9ef834c05231cef937f3e896843b53f56 /drivers/md/md-bitmap.c | |
| parent | 5ae58d1500e3fc16df3267fad810955c949afdb2 (diff) | |
md/md-bitmap: handle the case bitmap is not enabled before end_sync()
This case can be handled without knowing internal implementation.
Prepare to introduce CONFIG_MD_BITMAP.
Link: https://lore.kernel.org/linux-raid/20250707012711.376844-9-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Diffstat (limited to 'drivers/md/md-bitmap.c')
| -rw-r--r-- | drivers/md/md-bitmap.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 625f74115352..62b0eac28a7d 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -1838,10 +1838,6 @@ static void __bitmap_end_sync(struct bitmap *bitmap, sector_t offset, bitmap_counter_t *bmc; unsigned long flags; - if (bitmap == NULL) { - *blocks = 1024; - return; - } spin_lock_irqsave(&bitmap->counts.lock, flags); bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); if (bmc == NULL) |