mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: sk_sleep() helper
Define a new function to return the waitqueue of a "struct sock".
static inline wait_queue_head_t *sk_sleep(struct sock *sk)
{
return sk->sk_sleep;
}
Change all read occurrences of sk_sleep by a call to this function.
Needed for a future RCU conversion. sk_sleep wont be a field directly
available.
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ab9304717f
commit
aa39514516
46 changed files with 208 additions and 204 deletions
|
|
@ -158,7 +158,7 @@ static unsigned int rds_poll(struct file *file, struct socket *sock,
|
|||
unsigned int mask = 0;
|
||||
unsigned long flags;
|
||||
|
||||
poll_wait(file, sk->sk_sleep, wait);
|
||||
poll_wait(file, sk_sleep(sk), wait);
|
||||
|
||||
if (rs->rs_seen_congestion)
|
||||
poll_wait(file, &rds_poll_waitq, wait);
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ void rds_sock_put(struct rds_sock *rs);
|
|||
void rds_wake_sk_sleep(struct rds_sock *rs);
|
||||
static inline void __rds_wake_sk_sleep(struct sock *sk)
|
||||
{
|
||||
wait_queue_head_t *waitq = sk->sk_sleep;
|
||||
wait_queue_head_t *waitq = sk_sleep(sk);
|
||||
|
||||
if (!sock_flag(sk, SOCK_DEAD) && waitq)
|
||||
wake_up(waitq);
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
|
|||
break;
|
||||
}
|
||||
|
||||
timeo = wait_event_interruptible_timeout(*sk->sk_sleep,
|
||||
timeo = wait_event_interruptible_timeout(*sk_sleep(sk),
|
||||
(!list_empty(&rs->rs_notify_queue) ||
|
||||
rs->rs_cong_notify ||
|
||||
rds_next_incoming(rs, &inc)), timeo);
|
||||
|
|
|
|||
|
|
@ -915,7 +915,7 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
|
|||
goto out;
|
||||
}
|
||||
|
||||
timeo = wait_event_interruptible_timeout(*sk->sk_sleep,
|
||||
timeo = wait_event_interruptible_timeout(*sk_sleep(sk),
|
||||
rds_send_queue_rm(rs, conn, rm,
|
||||
rs->rs_bound_port,
|
||||
dport,
|
||||
|
|
|
|||
Loading…
Reference in a new issue