aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 2bbab4fe2f53..357954ceb25c 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -714,7 +714,6 @@ static unsigned int tipc_poll(struct file *file, struct socket *sock,
714 poll_table *wait) 714 poll_table *wait)
715{ 715{
716 struct sock *sk = sock->sk; 716 struct sock *sk = sock->sk;
717 struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
718 struct tipc_sock *tsk = tipc_sk(sk); 717 struct tipc_sock *tsk = tipc_sk(sk);
719 struct tipc_group *grp = tsk->group; 718 struct tipc_group *grp = tsk->group;
720 u32 revents = 0; 719 u32 revents = 0;
@@ -733,7 +732,7 @@ static unsigned int tipc_poll(struct file *file, struct socket *sock,
733 /* fall thru' */ 732 /* fall thru' */
734 case TIPC_LISTEN: 733 case TIPC_LISTEN:
735 case TIPC_CONNECTING: 734 case TIPC_CONNECTING:
736 if (skb) 735 if (!skb_queue_empty(&sk->sk_receive_queue))
737 revents |= POLLIN | POLLRDNORM; 736 revents |= POLLIN | POLLRDNORM;
738 break; 737 break;
739 case TIPC_OPEN: 738 case TIPC_OPEN:
@@ -742,7 +741,7 @@ static unsigned int tipc_poll(struct file *file, struct socket *sock,
742 revents |= POLLOUT; 741 revents |= POLLOUT;
743 if (!tipc_sk_type_connectionless(sk)) 742 if (!tipc_sk_type_connectionless(sk))
744 break; 743 break;
745 if (!skb) 744 if (skb_queue_empty(&sk->sk_receive_queue))
746 break; 745 break;
747 revents |= POLLIN | POLLRDNORM; 746 revents |= POLLIN | POLLRDNORM;
748 break; 747 break;