Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73252
b: refs/heads/master
c: 429f08e
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Nov 7, 2007
1 parent d14b013 commit edae6ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e011ff48abc1b0ee97cde26b7700d2cca689e7c3
refs/heads/master: 429f08e950a88cd826b203ea898c2f2d0f7db9de
28 changes: 13 additions & 15 deletions trunk/net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,17 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
return err;
}

static void ip_cork_release(struct inet_sock *inet)
{
inet->cork.flags &= ~IPCORK_OPT;
kfree(inet->cork.opt);
inet->cork.opt = NULL;
if (inet->cork.rt) {
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
}
}

/*
* Combined all pending IP fragments on the socket as one IP datagram
* and push them out.
Expand Down Expand Up @@ -1276,13 +1287,7 @@ int ip_push_pending_frames(struct sock *sk)
}

out:
inet->cork.flags &= ~IPCORK_OPT;
kfree(inet->cork.opt);
inet->cork.opt = NULL;
if (inet->cork.rt) {
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
}
ip_cork_release(inet);
return err;

error:
Expand All @@ -1295,19 +1300,12 @@ int ip_push_pending_frames(struct sock *sk)
*/
void ip_flush_pending_frames(struct sock *sk)
{
struct inet_sock *inet = inet_sk(sk);
struct sk_buff *skb;

while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL)
kfree_skb(skb);

inet->cork.flags &= ~IPCORK_OPT;
kfree(inet->cork.opt);
inet->cork.opt = NULL;
if (inet->cork.rt) {
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
}
ip_cork_release(inet_sk(sk));
}


Expand Down

0 comments on commit edae6ba

Please sign in to comment.