net: Use consume_skb() to free gso segmented skb

Use consume_skb() to free the original skb that is successfully transmitted
as gso segmented skbs so that it is not treated as a drop due to an error.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sridhar Samudrala 2013-04-29 13:02:42 +00:00 committed by David S. Miller
parent 1ab137bc99
commit 0c772159d1

View File

@ -2565,8 +2565,11 @@ gso:
} while (skb->next);
out_kfree_gso_skb:
if (likely(skb->next == NULL))
if (likely(skb->next == NULL)) {
skb->destructor = DEV_GSO_CB(skb)->destructor;
consume_skb(skb);
return rc;
}
out_kfree_skb:
kfree_skb(skb);
out: