diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
| -rw-r--r-- | net/ipv6/ip6_output.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 519ac97d90e7..99c5c5360c48 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -153,7 +153,7 @@ int ip6_route_me_harder(struct sk_buff *skb) struct ipv6hdr *iph = skb->nh.ipv6h; struct dst_entry *dst; struct flowi fl = { - .oif = skb->sk ? skb->sk->bound_dev_if : 0, + .oif = skb->sk ? skb->sk->sk_bound_dev_if : 0, .nl_u = { .ip6_u = { .daddr = iph->daddr, @@ -457,7 +457,7 @@ static int ip6_frag_xmit(struct sock *sk, inet_getfrag_t getfrag, struct frag_hdr *fhdr2; - skb = skb_copy(last_skb, sk->allocation); + skb = skb_copy(last_skb, sk->sk_allocation); if (skb == NULL) { IP6_INC_STATS(Ip6FragFails); @@ -1222,13 +1222,14 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse if (flags&MSG_PROBE) return 0; - if (skb_queue_empty(&sk->write_queue)) { + if (skb_queue_empty(&sk->sk_write_queue)) { /* * setup for corking */ if (opt) { if (np->cork.opt == NULL) - np->cork.opt = kmalloc(opt->tot_len, sk->allocation); + np->cork.opt = kmalloc(opt->tot_len, + sk->sk_allocation); memcpy(np->cork.opt, opt, opt->tot_len); inet->cork.flags |= IPCORK_OPT; /* need source address above miyazawa*/ @@ -1268,7 +1269,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse inet->cork.length += length; - if ((skb = skb_peek_tail(&sk->write_queue)) == NULL) + if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) goto alloc_new_skb; while (length > 0) { @@ -1295,10 +1296,11 @@ alloc_new_skb: (flags & MSG_DONTWAIT), &err); } else { skb = NULL; - if (atomic_read(&sk->wmem_alloc) <= 2*sk->sndbuf) + if (atomic_read(&sk->sk_wmem_alloc) <= + 2 * sk->sk_sndbuf) skb = sock_wmalloc(sk, alloclen + hh_len + 15, 1, - sk->allocation); + sk->sk_allocation); if (unlikely(skb == NULL)) err = -ENOBUFS; } @@ -1335,7 +1337,7 @@ alloc_new_skb: /* * Put the packet on the pending queue */ - __skb_queue_tail(&sk->write_queue, skb); + __skb_queue_tail(&sk->sk_write_queue, skb); continue; } @@ -1374,7 +1376,7 @@ alloc_new_skb: } else if(i < MAX_SKB_FRAGS) { if (copy > PAGE_SIZE) copy = PAGE_SIZE; - page = alloc_pages(sk->allocation, 0); + page = alloc_pages(sk->sk_allocation, 0); if (page == NULL) { err = -ENOMEM; goto error; @@ -1385,7 +1387,7 @@ alloc_new_skb: skb_fill_page_desc(skb, i, page, 0, 0); frag = &skb_shinfo(skb)->frags[i]; skb->truesize += PAGE_SIZE; - atomic_add(PAGE_SIZE, &sk->wmem_alloc); + atomic_add(PAGE_SIZE, &sk->sk_wmem_alloc); } else { err = -EMSGSIZE; goto error; @@ -1423,14 +1425,14 @@ int ip6_push_pending_frames(struct sock *sk) unsigned char proto = fl->proto; int err = 0; - if ((skb = __skb_dequeue(&sk->write_queue)) == NULL) + if ((skb = __skb_dequeue(&sk->sk_write_queue)) == NULL) goto out; tail_skb = &(skb_shinfo(skb)->frag_list); /* move skb->data to ip header from ext header */ if (skb->data < skb->nh.raw) __skb_pull(skb, skb->nh.raw - skb->data); - while ((tmp_skb = __skb_dequeue(&sk->write_queue)) != NULL) { + while ((tmp_skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) { __skb_pull(tmp_skb, skb->h.raw - skb->nh.raw); *tail_skb = tmp_skb; tail_skb = &(tmp_skb->next); @@ -1496,7 +1498,7 @@ void ip6_flush_pending_frames(struct sock *sk) struct ipv6_pinfo *np = inet6_sk(sk); struct sk_buff *skb; - while ((skb = __skb_dequeue_tail(&sk->write_queue)) != NULL) + while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) kfree_skb(skb); inet->cork.flags &= ~IPCORK_OPT; |
