]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net/mlx5: Remove unnecessary spin lock protection
authorEli Cohen <elic@nvidia.com>
Mon, 3 May 2021 06:22:43 +0000 (09:22 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 May 2021 18:54:39 +0000 (11:54 -0700)
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 <elic@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c

index b8748390335fd8f72d85a2d6c7256853839fdd11..c9c00163d9183c243e8e048947aa03c7560a5b08 100644 (file)
@@ -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);