diff options
Diffstat (limited to 'net/atm/common.c')
| -rw-r--r-- | net/atm/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index e93e838069e8..63feea49fb13 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
| @@ -46,7 +46,7 @@ static void __vcc_insert_socket(struct sock *sk) | |||
| 46 | struct atm_vcc *vcc = atm_sk(sk); | 46 | struct atm_vcc *vcc = atm_sk(sk); |
| 47 | struct hlist_head *head = &vcc_hash[vcc->vci & | 47 | struct hlist_head *head = &vcc_hash[vcc->vci & |
| 48 | (VCC_HTABLE_SIZE - 1)]; | 48 | (VCC_HTABLE_SIZE - 1)]; |
| 49 | sk->sk_hashent = vcc->vci & (VCC_HTABLE_SIZE - 1); | 49 | sk->sk_hash = vcc->vci & (VCC_HTABLE_SIZE - 1); |
| 50 | sk_add_node(sk, head); | 50 | sk_add_node(sk, head); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| @@ -178,8 +178,6 @@ static void vcc_destroy_socket(struct sock *sk) | |||
| 178 | if (vcc->push) | 178 | if (vcc->push) |
| 179 | vcc->push(vcc, NULL); /* atmarpd has no push */ | 179 | vcc->push(vcc, NULL); /* atmarpd has no push */ |
| 180 | 180 | ||
| 181 | vcc_remove_socket(sk); /* no more receive */ | ||
| 182 | |||
| 183 | while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { | 181 | while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { |
| 184 | atm_return(vcc,skb->truesize); | 182 | atm_return(vcc,skb->truesize); |
| 185 | kfree_skb(skb); | 183 | kfree_skb(skb); |
| @@ -188,6 +186,8 @@ static void vcc_destroy_socket(struct sock *sk) | |||
| 188 | module_put(vcc->dev->ops->owner); | 186 | module_put(vcc->dev->ops->owner); |
| 189 | atm_dev_put(vcc->dev); | 187 | atm_dev_put(vcc->dev); |
| 190 | } | 188 | } |
| 189 | |||
| 190 | vcc_remove_socket(sk); | ||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | 193 | ||
