Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NET: sungem, use spin_trylock_irqsave

Use spin_trylock_irqsave instead of open-coded
local_irq_save+spin_trylock.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Slaby and committed by
David S. Miller
b8883a65 c6d14c84

+1 -3
+1 -3
drivers/net/sungem.c
··· 1033 1033 (csum_stuff_off << 21)); 1034 1034 } 1035 1035 1036 - local_irq_save(flags); 1037 - if (!spin_trylock(&gp->tx_lock)) { 1036 + if (!spin_trylock_irqsave(&gp->tx_lock, flags)) { 1038 1037 /* Tell upper layer to requeue */ 1039 - local_irq_restore(flags); 1040 1038 return NETDEV_TX_LOCKED; 1041 1039 } 1042 1040 /* We raced with gem_do_stop() */