aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
authorBenjamin LaHaise <benjamin.c.lahaise@intel.com>2005-12-14 02:22:19 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 16:10:44 -0500
commitc1cbe4b7ad0bc4b1d98ea708a3fecb7362aa4088 (patch)
tree04ec26c728645dd1da2474b2b883a532b43811ad /net/llc
parentf1f71e03b17db3b9edb0264a8be7719bd5c35582 (diff)
[NET]: Avoid atomic xchg() for non-error case
It also looks like there were 2 places where the test on sk_err was missing from the event wait logic (in sk_stream_wait_connect and sk_stream_wait_memory), while the rest of the sock_error() users look to be doing the right thing. This version of the patch fixes those, and cleans up a few places that were testing ->sk_err directly. Signed-off-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/af_llc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index c3f0b0783453..b6d3df5c911c 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -566,10 +566,9 @@ static int llc_wait_data(struct sock *sk, long timeo)
566 /* 566 /*
567 * POSIX 1003.1g mandates this order. 567 * POSIX 1003.1g mandates this order.
568 */ 568 */
569 if (sk->sk_err) { 569 rc = sock_error(sk);
570 rc = sock_error(sk); 570 if (rc)
571 break; 571 break;
572 }
573 rc = 0; 572 rc = 0;
574 if (sk->sk_shutdown & RCV_SHUTDOWN) 573 if (sk->sk_shutdown & RCV_SHUTDOWN)
575 break; 574 break;