diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 08:59:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-20 08:59:45 -0400 |
commit | d59bf96cdde5b874a57bfd1425faa45da915d0b7 (patch) | |
tree | 351a40b72514d620e5bebea2de38c26f23277ffc /net/llc/af_llc.c | |
parent | 28df955a2ad484d602314b30183ea8496a9aa34a (diff) | |
parent | 25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r-- | net/llc/af_llc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 5a04db745c8d..75c9b1480801 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -674,7 +674,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
674 | 674 | ||
675 | lock_sock(sk); | 675 | lock_sock(sk); |
676 | copied = -ENOTCONN; | 676 | copied = -ENOTCONN; |
677 | if (sk->sk_state == TCP_LISTEN) | 677 | if (unlikely(sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN)) |
678 | goto out; | 678 | goto out; |
679 | 679 | ||
680 | timeo = sock_rcvtimeo(sk, nonblock); | 680 | timeo = sock_rcvtimeo(sk, nonblock); |
@@ -733,7 +733,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
733 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 733 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
734 | break; | 734 | break; |
735 | 735 | ||
736 | if (sk->sk_state == TCP_CLOSE) { | 736 | if (sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_CLOSE) { |
737 | if (!sock_flag(sk, SOCK_DONE)) { | 737 | if (!sock_flag(sk, SOCK_DONE)) { |
738 | /* | 738 | /* |
739 | * This occurs when user tries to read | 739 | * This occurs when user tries to read |
@@ -789,7 +789,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
789 | continue; | 789 | continue; |
790 | 790 | ||
791 | if (!(flags & MSG_PEEK)) { | 791 | if (!(flags & MSG_PEEK)) { |
792 | sk_eat_skb(sk, skb); | 792 | sk_eat_skb(sk, skb, 0); |
793 | *seq = 0; | 793 | *seq = 0; |
794 | } | 794 | } |
795 | } while (len > 0); | 795 | } while (len > 0); |