Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 996b0541 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller
Browse files

mlx4: not using spin_lock_irq when getting vf by resource.



The function is always called from irq context, changing the call
to spin_lock().

Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e03567a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -339,14 +339,14 @@ int mlx4_get_slave_from_resource_id(struct mlx4_dev *dev,

	if (type == RES_QP)
		id &= 0x7fffff;
	spin_lock_irq(mlx4_tlock(dev));
	spin_lock(mlx4_tlock(dev));

	r = find_res(dev, id, type);
	if (r) {
		*slave = r->owner;
		err = 0;
	}
	spin_unlock_irq(mlx4_tlock(dev));
	spin_unlock(mlx4_tlock(dev));

	return err;
}