af_rds.c (62910554656cdcd6b6f84a5154c4155aae4ca231) af_rds.c (aa395145165cb06a0d0885221bbe0ce4a564391d)
1/*
2 * Copyright (c) 2006 Oracle. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 144 unchanged lines hidden (view full) ---

153static unsigned int rds_poll(struct file *file, struct socket *sock,
154 poll_table *wait)
155{
156 struct sock *sk = sock->sk;
157 struct rds_sock *rs = rds_sk_to_rs(sk);
158 unsigned int mask = 0;
159 unsigned long flags;
160
1/*
2 * Copyright (c) 2006 Oracle. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 144 unchanged lines hidden (view full) ---

153static unsigned int rds_poll(struct file *file, struct socket *sock,
154 poll_table *wait)
155{
156 struct sock *sk = sock->sk;
157 struct rds_sock *rs = rds_sk_to_rs(sk);
158 unsigned int mask = 0;
159 unsigned long flags;
160
161 poll_wait(file, sk->sk_sleep, wait);
161 poll_wait(file, sk_sleep(sk), wait);
162
163 if (rs->rs_seen_congestion)
164 poll_wait(file, &rds_poll_waitq, wait);
165
166 read_lock_irqsave(&rs->rs_recv_lock, flags);
167 if (!rs->rs_cong_monitor) {
168 /* When a congestion map was updated, we signal POLLIN for
169 * "historical" reasons. Applications can also poll for

--- 416 unchanged lines hidden ---
162
163 if (rs->rs_seen_congestion)
164 poll_wait(file, &rds_poll_waitq, wait);
165
166 read_lock_irqsave(&rs->rs_recv_lock, flags);
167 if (!rs->rs_cong_monitor) {
168 /* When a congestion map was updated, we signal POLLIN for
169 * "historical" reasons. Applications can also poll for

--- 416 unchanged lines hidden ---