diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:07:57 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:07:57 -0500 |
| commit | c5b875e354a54e2b5ba24eecae69bf94e025edd5 (patch) | |
| tree | 0446a68d99ad50305ab78835456d9faa62be5948 /net/ipv4/ip_output.c | |
| parent | eae1920a21b4f87e89cea802e7df39442b119617 (diff) | |
| parent | c3d8d1e30cace31fed6186a4b8c6b1401836d89c (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (44 commits)
[NETLINK]: Fix unicast timeouts
[INET]: Remove per bucket rwlock in tcp/dccp ehash table.
[IPVS]: Synchronize closing of Connections
[IPVS]: Bind connections on stanby if the destination exists
[NET]: Remove Documentation/networking/pt.txt
[NET]: Remove Documentation/networking/routing.txt
[NET]: Remove Documentation/networking/ncsa-telnet
[NET]: Remove comx driver docs.
[NET]: Remove Documentation/networking/Configurable
[NET]: Clean proto_(un)register from in-code ifdefs
[IPSEC]: Fix crypto_alloc_comp error checking
[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
[NETNS]: Fix compiler error in net_namespace.c
[TTY]: Use tty_mode_ioctl() in network drivers.
[TTY]: Fix network driver interactions with TCGET/SET calls.
[PKT_SCHED] CLS_U32: Fix endianness problem with u32 classifier hash masks.
[NET]: Removing duplicit #includes
[NET]: Let USB_USBNET always select MII.
[RRUNNER]: Do not muck with sysctl_{r,w}mem_max
[DLM] lowcomms: Do not muck with sysctl_rmem_max.
...
Diffstat (limited to 'net/ipv4/ip_output.c')
| -rw-r--r-- | net/ipv4/ip_output.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index e5f7dc2de303..fd99fbd685ea 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -1183,6 +1183,17 @@ error: | |||
| 1183 | return err; | 1183 | return err; |
| 1184 | } | 1184 | } |
| 1185 | 1185 | ||
| 1186 | static void ip_cork_release(struct inet_sock *inet) | ||
| 1187 | { | ||
| 1188 | inet->cork.flags &= ~IPCORK_OPT; | ||
| 1189 | kfree(inet->cork.opt); | ||
| 1190 | inet->cork.opt = NULL; | ||
| 1191 | if (inet->cork.rt) { | ||
| 1192 | ip_rt_put(inet->cork.rt); | ||
| 1193 | inet->cork.rt = NULL; | ||
| 1194 | } | ||
| 1195 | } | ||
| 1196 | |||
| 1186 | /* | 1197 | /* |
| 1187 | * Combined all pending IP fragments on the socket as one IP datagram | 1198 | * Combined all pending IP fragments on the socket as one IP datagram |
| 1188 | * and push them out. | 1199 | * and push them out. |
| @@ -1276,13 +1287,7 @@ int ip_push_pending_frames(struct sock *sk) | |||
| 1276 | } | 1287 | } |
| 1277 | 1288 | ||
| 1278 | out: | 1289 | out: |
| 1279 | inet->cork.flags &= ~IPCORK_OPT; | 1290 | ip_cork_release(inet); |
| 1280 | kfree(inet->cork.opt); | ||
| 1281 | inet->cork.opt = NULL; | ||
| 1282 | if (inet->cork.rt) { | ||
| 1283 | ip_rt_put(inet->cork.rt); | ||
| 1284 | inet->cork.rt = NULL; | ||
| 1285 | } | ||
| 1286 | return err; | 1291 | return err; |
| 1287 | 1292 | ||
| 1288 | error: | 1293 | error: |
| @@ -1295,19 +1300,12 @@ error: | |||
| 1295 | */ | 1300 | */ |
| 1296 | void ip_flush_pending_frames(struct sock *sk) | 1301 | void ip_flush_pending_frames(struct sock *sk) |
| 1297 | { | 1302 | { |
| 1298 | struct inet_sock *inet = inet_sk(sk); | ||
| 1299 | struct sk_buff *skb; | 1303 | struct sk_buff *skb; |
| 1300 | 1304 | ||
| 1301 | while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) | 1305 | while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) |
| 1302 | kfree_skb(skb); | 1306 | kfree_skb(skb); |
| 1303 | 1307 | ||
| 1304 | inet->cork.flags &= ~IPCORK_OPT; | 1308 | ip_cork_release(inet_sk(sk)); |
| 1305 | kfree(inet->cork.opt); | ||
| 1306 | inet->cork.opt = NULL; | ||
| 1307 | if (inet->cork.rt) { | ||
| 1308 | ip_rt_put(inet->cork.rt); | ||
| 1309 | inet->cork.rt = NULL; | ||
| 1310 | } | ||
| 1311 | } | 1309 | } |
| 1312 | 1310 | ||
| 1313 | 1311 | ||
