aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorYu Kuai <[email protected]>2024-08-26 07:44:44 +0000
committerSong Liu <[email protected]>2024-08-27 19:43:15 +0000
commite1791dae6cbd65e5102dca40b8adadef1d89c1b9 (patch)
treeeac6979de71f17227293294a49bd1e0fb9dd0e39 /drivers/md/dm-raid.c
parentmd/md-bitmap: merge md_bitmap_daemon_work() into bitmap_operations (diff)
downloadkernel-e1791dae6cbd65e5102dca40b8adadef1d89c1b9.tar.gz
kernel-e1791dae6cbd65e5102dca40b8adadef1d89c1b9.zip
md/md-bitmap: pass in mddev directly for md_bitmap_resize()
And move the condition "if (mddev->bitmap)" into md_bitmap_resize() as well, on the one hand make code cleaner, on the other hand try not to access bitmap directly. Since we are here, also change the parameter 'init' from int to bool. Signed-off-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index c3e201fde4c5..cc071fcd7a04 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -4068,7 +4068,7 @@ static int raid_preresume(struct dm_target *ti)
mddev->bitmap_info.chunksize != to_bytes(rs->requested_bitmap_chunk_sectors)))) {
int chunksize = to_bytes(rs->requested_bitmap_chunk_sectors) ?: mddev->bitmap_info.chunksize;
- r = md_bitmap_resize(mddev->bitmap, mddev->dev_sectors, chunksize, 0);
+ r = md_bitmap_resize(mddev, mddev->dev_sectors, chunksize, false);
if (r)
DMERR("Failed to resize bitmap");
}