diff options
| author | Yu Kuai <[email protected]> | 2024-08-26 07:44:44 +0000 |
|---|---|---|
| committer | Song Liu <[email protected]> | 2024-08-27 19:43:15 +0000 |
| commit | e1791dae6cbd65e5102dca40b8adadef1d89c1b9 (patch) | |
| tree | eac6979de71f17227293294a49bd1e0fb9dd0e39 /drivers/md/md-cluster.c | |
| parent | md/md-bitmap: merge md_bitmap_daemon_work() into bitmap_operations (diff) | |
| download | kernel-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/md-cluster.c')
| -rw-r--r-- | drivers/md/md-cluster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 55feabe14ad3..a7e5ead71c2f 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -628,8 +628,8 @@ static int process_recvd_msg(struct mddev *mddev, struct cluster_msg *msg) break; case BITMAP_RESIZE: if (le64_to_cpu(msg->high) != mddev->pers->size(mddev, 0, 0)) - ret = md_bitmap_resize(mddev->bitmap, - le64_to_cpu(msg->high), 0, 0); + ret = md_bitmap_resize(mddev, le64_to_cpu(msg->high), 0, + false); break; default: ret = -1; |
