diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-20 09:03:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-20 19:37:13 -0400 |
commit | aa395145165cb06a0d0885221bbe0ce4a564391d (patch) | |
tree | 118b0403621f10db8dc3dbf12079f9af5b19e05d /drivers/atm/atmtcp.c | |
parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) |
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 <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/atmtcp.c')
-rw-r--r-- | drivers/atm/atmtcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c index b86712167eb8..b9101818b47b 100644 --- a/drivers/atm/atmtcp.c +++ b/drivers/atm/atmtcp.c | |||
@@ -68,7 +68,7 @@ static int atmtcp_send_control(struct atm_vcc *vcc,int type, | |||
68 | *(struct atm_vcc **) &new_msg->vcc = vcc; | 68 | *(struct atm_vcc **) &new_msg->vcc = vcc; |
69 | old_test = test_bit(flag,&vcc->flags); | 69 | old_test = test_bit(flag,&vcc->flags); |
70 | out_vcc->push(out_vcc,skb); | 70 | out_vcc->push(out_vcc,skb); |
71 | add_wait_queue(sk_atm(vcc)->sk_sleep, &wait); | 71 | add_wait_queue(sk_sleep(sk_atm(vcc)), &wait); |
72 | while (test_bit(flag,&vcc->flags) == old_test) { | 72 | while (test_bit(flag,&vcc->flags) == old_test) { |
73 | mb(); | 73 | mb(); |
74 | out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; | 74 | 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, | |||
80 | schedule(); | 80 | schedule(); |
81 | } | 81 | } |
82 | set_current_state(TASK_RUNNING); | 82 | set_current_state(TASK_RUNNING); |
83 | remove_wait_queue(sk_atm(vcc)->sk_sleep, &wait); | 83 | remove_wait_queue(sk_sleep(sk_atm(vcc)), &wait); |
84 | return error; | 84 | return error; |
85 | } | 85 | } |
86 | 86 | ||
@@ -105,7 +105,7 @@ static int atmtcp_recv_control(const struct atmtcp_control *msg) | |||
105 | msg->type); | 105 | msg->type); |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | } | 107 | } |
108 | wake_up(sk_atm(vcc)->sk_sleep); | 108 | wake_up(sk_sleep(sk_atm(vcc))); |
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
111 | 111 | ||