Skip to content

Commit a546432

Browse files
elic307iSaeed Mahameed
authored andcommitted
net/mlx5: Remove unnecessary spin lock protection
Taking lag_lock to access ldev->tracker is meaningless in the context of do_bond() and mlx5_lag_netdev_event(). Signed-off-by: Eli Cohen <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 71513c0 commit a546432

File tree

1 file changed

+0
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+0
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,7 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)
280280
if (!mlx5_lag_is_ready(ldev))
281281
return;
282282

283-
spin_lock(&lag_lock);
284283
tracker = ldev->tracker;
285-
spin_unlock(&lag_lock);
286284

287285
do_bond = tracker.is_bonded && mlx5_lag_check_prereq(ldev);
288286

@@ -481,9 +479,7 @@ static int mlx5_lag_netdev_event(struct notifier_block *this,
481479
break;
482480
}
483481

484-
spin_lock(&lag_lock);
485482
ldev->tracker = tracker;
486-
spin_unlock(&lag_lock);
487483

488484
if (changed)
489485
mlx5_queue_bond_work(ldev, 0);

0 commit comments

Comments
 (0)