Commit a546432f authored by Eli Cohen's avatar Eli Cohen Committed by Saeed Mahameed

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: default avatarEli Cohen <elic@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 71513c05
......@@ -280,9 +280,7 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)
if (!mlx5_lag_is_ready(ldev))
return;
spin_lock(&lag_lock);
tracker = ldev->tracker;
spin_unlock(&lag_lock);
do_bond = tracker.is_bonded && mlx5_lag_check_prereq(ldev);
......@@ -481,9 +479,7 @@ static int mlx5_lag_netdev_event(struct notifier_block *this,
break;
}
spin_lock(&lag_lock);
ldev->tracker = tracker;
spin_unlock(&lag_lock);
if (changed)
mlx5_queue_bond_work(ldev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment