[NETFILTER]: Do not copy skb in skb_make_writable

Now that all callers of netfilter can guarantee that the skb is not shared,
we no longer have to copy the skb in skb_make_writable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Herbert Xu
2007-10-14 00:39:18 -07:00
committed by David S. Miller
parent 7b995651e3
commit 37d4187922
18 changed files with 35 additions and 45 deletions

View File

@@ -362,7 +362,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
}
skb_put(e->skb, diff);
}
if (!skb_make_writable(&e->skb, v->data_len))
if (!skb_make_writable(e->skb, v->data_len))
return -ENOMEM;
skb_copy_to_linear_data(e->skb, v->payload, v->data_len);
e->skb->ip_summed = CHECKSUM_NONE;

View File

@@ -29,7 +29,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
const struct ip6t_HL_info *info = targinfo;
int new_hl;
if (!skb_make_writable(pskb, (*pskb)->len))
if (!skb_make_writable(*pskb, (*pskb)->len))
return NF_DROP;
ip6h = ipv6_hdr(*pskb);