mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
|
|
@ -68,7 +68,7 @@ static int atmtcp_send_control(struct atm_vcc *vcc,int type,
|
|||
*(struct atm_vcc **) &new_msg->vcc = vcc;
|
||||
old_test = test_bit(flag,&vcc->flags);
|
||||
out_vcc->push(out_vcc,skb);
|
||||
add_wait_queue(sk_atm(vcc)->sk_sleep, &wait);
|
||||
add_wait_queue(sk_sleep(sk_atm(vcc)), &wait);
|
||||
while (test_bit(flag,&vcc->flags) == old_test) {
|
||||
mb();
|
||||
out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL;
|
||||
|
|
@ -80,7 +80,7 @@ static int atmtcp_send_control(struct atm_vcc *vcc,int type,
|
|||
schedule();
|
||||
}
|
||||
set_current_state(TASK_RUNNING);
|
||||
remove_wait_queue(sk_atm(vcc)->sk_sleep, &wait);
|
||||
remove_wait_queue(sk_sleep(sk_atm(vcc)), &wait);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ static int atmtcp_recv_control(const struct atmtcp_control *msg)
|
|||
msg->type);
|
||||
return -EINVAL;
|
||||
}
|
||||
wake_up(sk_atm(vcc)->sk_sleep);
|
||||
wake_up(sk_sleep(sk_atm(vcc)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue