[Ocfs2-commits] mfasheh commits r1760 - trunk/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Jan 12 16:36:53 CST 2005
Author: mfasheh
Date: 2005-01-12 16:36:51 -0600 (Wed, 12 Jan 2005)
New Revision: 1760
Modified:
trunk/cluster/tcp.c
Log:
* fix net_rx_should_wake to check a proper set of conditions before
returning true.
Modified: trunk/cluster/tcp.c
===================================================================
--- trunk/cluster/tcp.c 2005-01-12 19:45:33 UTC (rev 1759)
+++ trunk/cluster/tcp.c 2005-01-12 22:36:51 UTC (rev 1760)
@@ -438,10 +438,22 @@
static int net_rx_should_wake(void)
{
- int empty;
+ int empty = 1;
+ struct list_head *iter;
+ net_inode_private *net;
+ struct socket *socket;
spin_lock(&net_list_lock);
- empty = list_empty(&net_recv_list);
+ list_for_each(iter, &net_recv_list) {
+ net = list_entry(iter, net_inode_private, list);
+ socket = net->sock;
+
+ if (socket &&
+ !skb_queue_empty(&socket->sk->sk_receive_queue)) {
+ empty = 0;
+ break;
+ }
+ }
spin_unlock(&net_list_lock);
return !empty || tcp_sk(recv_sock->sk)->accept_queue;
More information about the Ocfs2-commits
mailing list