aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-11-26 00:55:39 -0500
committerDavid S. Miller <davem@davemloft.net>2015-11-30 14:47:33 -0500
commit1ce0bf50ae2233c7115a18c0c623662d177b434c (patch)
tree41860e17fe4b2184055d29e669e503d09796775a /net/tipc/socket.c
parentc52fd05a2ff2ad20e2a7056baf314c7d1d624ba9 (diff)
net: Generalise wq_has_sleeper helper
The memory barrier in the helper wq_has_sleeper is needed by just about every user of waitqueue_active. This patch generalises it by making it take a wait_queue_head_t directly. The existing helper is renamed to skwq_has_sleeper. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 552dbaba9cf3..525acf6dd1c6 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1492,7 +1492,7 @@ static void tipc_write_space(struct sock *sk)
1492 1492
1493 rcu_read_lock(); 1493 rcu_read_lock();
1494 wq = rcu_dereference(sk->sk_wq); 1494 wq = rcu_dereference(sk->sk_wq);
1495 if (wq_has_sleeper(wq)) 1495 if (skwq_has_sleeper(wq))
1496 wake_up_interruptible_sync_poll(&wq->wait, POLLOUT | 1496 wake_up_interruptible_sync_poll(&wq->wait, POLLOUT |
1497 POLLWRNORM | POLLWRBAND); 1497 POLLWRNORM | POLLWRBAND);
1498 rcu_read_unlock(); 1498 rcu_read_unlock();
@@ -1509,7 +1509,7 @@ static void tipc_data_ready(struct sock *sk)
1509 1509
1510 rcu_read_lock(); 1510 rcu_read_lock();
1511 wq = rcu_dereference(sk->sk_wq); 1511 wq = rcu_dereference(sk->sk_wq);
1512 if (wq_has_sleeper(wq)) 1512 if (skwq_has_sleeper(wq))
1513 wake_up_interruptible_sync_poll(&wq->wait, POLLIN | 1513 wake_up_interruptible_sync_poll(&wq->wait, POLLIN |
1514 POLLRDNORM | POLLRDBAND); 1514 POLLRDNORM | POLLRDBAND);
1515 rcu_read_unlock(); 1515 rcu_read_unlock();