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

Commit a20583a7 authored by Roland Dreier's avatar Roland Dreier
Browse files

[IPoIB] use spin_trylock_irqsave()



Use spin_trylock_irqsave() in ipoib_start_xmit() instead of
reinventing it out of local_irq_save(), spin_trylock() and
local_irq_restore().

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent affcd505
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -551,11 +551,8 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
	struct ipoib_neigh *neigh;
	unsigned long flags;

	local_irq_save(flags);
	if (!spin_trylock(&priv->tx_lock)) {
		local_irq_restore(flags);
	if (!spin_trylock_irqsave(&priv->tx_lock, flags))
		return NETDEV_TX_LOCKED;
	}

	/*
	 * Check if our queue is stopped.  Since we have the LLTX bit