direct-io.hg

changeset 10722:7dfc65c38035

[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>
author kfraser@localhost.localdomain
date Tue Jul 25 15:21:59 2006 +0100 (2006-07-25)
parents f021b091c559
children d71e72d8532c
files patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16.13/net-gso-3-fix-errorcheck.patch	Tue Jul 25 15:21:59 2006 +0100
     1.3 @@ -0,0 +1,17 @@
     1.4 +diff -urp a/include/linux/netdevice.h b/include/linux/netdevice.h
     1.5 +--- a/include/linux/netdevice.h	2006-07-25 15:16:39.314333975 +0100
     1.6 ++++ b/include/linux/netdevice.h	2006-07-25 15:19:37.298320799 +0100
     1.7 +@@ -930,10 +930,10 @@ static inline void netif_tx_lock_bh(stru
     1.8 + 
     1.9 + static inline int netif_tx_trylock(struct net_device *dev)
    1.10 + {
    1.11 +-	int err = spin_trylock(&dev->_xmit_lock);
    1.12 +-	if (!err)
    1.13 ++	int ok = spin_trylock(&dev->_xmit_lock);
    1.14 ++	if (likely(ok))
    1.15 + 		dev->xmit_lock_owner = smp_processor_id();
    1.16 +-	return err;
    1.17 ++	return ok;
    1.18 + }
    1.19 + 
    1.20 + static inline void netif_tx_unlock(struct net_device *dev)