Re: [PATCH md-6.15 5/7] md/md-cluster: cleanup md_cluster_ops reference

Glass Su
2025-02-17T10:29:15Z

> On Feb 15, 2025, at 17:22, Yu Kuai <yukuai1@huaweicloud.com> wrote:
>
> From: Yu Kuai <yukuai3@huawei.com>
>
> md_cluster_ops->slot_number() is implemented inside md-cluster.c, just
> call it directly.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Reviewed-by: Su Yue <glass.su@suse.com>
> ---
> drivers/md/md-cluster.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
> index 6595f89becdb..6fd436a1d373 100644
> --- a/drivers/md/md-cluster.c
> +++ b/drivers/md/md-cluster.c
> @@ -1166,7 +1166,7 @@ static int resize_bitmaps(struct mddev *mddev, sector_t newsize, sector_t oldsiz
> struct dlm_lock_resource *bm_lockres;
> char str[64];
>
> - if (i == md_cluster_ops->slot_number(mddev))
> + if (i == slot_number(mddev))
> continue;
>
> bitmap = mddev->bitmap_ops->get_from_slot(mddev, i);
> @@ -1216,7 +1216,7 @@ static int resize_bitmaps(struct mddev *mddev, sector_t newsize, sector_t oldsiz
> */
> static int cluster_check_sync_size(struct mddev *mddev)
> {
> - int current_slot = md_cluster_ops->slot_number(mddev);
> + int current_slot = slot_number(mddev);
> int node_num = mddev->bitmap_info.nodes;
> struct dlm_lock_resource *bm_lockres;
> struct md_bitmap_stats stats;
> --
> 2.39.2
>
>