projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf9915c
)
[NET]: Fix reversed error test in netif_tx_trylock
author
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 21 Jul 2006 21:55:38 +0000
(14:55 -0700)
committer
David S. Miller
<davem@davemloft.net>
Fri, 21 Jul 2006 21:55:38 +0000
(14:55 -0700)
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: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/netdevice.h
b/include/linux/netdevice.h
index 76cc099c8580fa06551f98f0ec2635f2c2a85496..75f02d8c6ed376b192858faff4de312c3b71e2ab 100644
(file)
--- a/
include/linux/netdevice.h
+++ b/
include/linux/netdevice.h
@@
-924,10
+924,10
@@
static inline void netif_tx_lock_bh(struct net_device *dev)
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)