Skip to content

Commit

Permalink
md/md-cluster: cleanup md_cluster_ops reference
Browse files Browse the repository at this point in the history
md_cluster_ops->slot_number() is implemented inside md-cluster.c, just
call it directly.

Link: https://lore.kernel.org/linux-raid/20250215092225.2427977-6-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Su Yue <glass.su@suse.com>
  • Loading branch information
Yu Kuai authored and Yu Kuai committed Mar 4, 2025
1 parent 3d44e1d commit ff84e1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/md-cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ff84e1b

Please sign in to comment.