[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [NET] gso: Fix reversed error test in netif_tx_trylock
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Node ID 7dfc65c380352627c1501fd34bdb1139bee3f3b4 # Parent f021b091c559f22245509ede9aa6fe244a251e11 [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@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> --- patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch | 13 +++++++++++++ 1 files changed, 13 insertions(+) diff -r f021b091c559 -r 7dfc65c38035 patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch Tue Jul 25 15:21:59 2006 +0100 @@ -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) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |