diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-25 15:21:59 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-07-25 15:21:59 +0100 |
commit | d2945ac88d5480267ea22186d98299683acf9c68 (patch) | |
tree | 2de5b20925e9885c2357bc9467e226036af1e636 /patches | |
parent | 19b294d7fcab2be94c6bef3c5af384eb415cb330 (diff) | |
download | xen-d2945ac88d5480267ea22186d98299683acf9c68.tar.gz xen-d2945ac88d5480267ea22186d98299683acf9c68.tar.bz2 xen-d2945ac88d5480267ea22186d98299683acf9c68.zip |
[NET] gso: Fix reversed error test in netif_tx_trylock
Original changelog:
[NET]: Fix reversed error test in netif_tx_trylock
A non-zero return value indicates success from spin_trylock,
not error.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch b/patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch new file mode 100644 index 0000000000..0b3dfd2870 --- /dev/null +++ b/patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch @@ -0,0 +1,17 @@ +diff -urp a/include/linux/netdevice.h b/include/linux/netdevice.h +--- a/include/linux/netdevice.h 2006-07-25 15:16:39.314333975 +0100 ++++ b/include/linux/netdevice.h 2006-07-25 15:19:37.298320799 +0100 +@@ -930,10 +930,10 @@ static inline void netif_tx_lock_bh(stru + + static inline int netif_tx_trylock(struct net_device *dev) + { +- int err = spin_trylock(&dev->_xmit_lock); +- if (!err) ++ int ok = spin_trylock(&dev->_xmit_lock); ++ if (likely(ok)) + dev->xmit_lock_owner = smp_processor_id(); +- return err; ++ return ok; + } + + static inline void netif_tx_unlock(struct net_device *dev) |