]> Pileus Git - ~andy/linux/blobdiff - net/sched/act_pedit.c
net: Add skb_unclone() helper function.
[~andy/linux] / net / sched / act_pedit.c
index 45c53ab067a63240357a970e15ab2633802211d6..7ed78c9e505cf7e18bc5a0b066837d19d33d4b10 100644 (file)
@@ -38,8 +38,9 @@ static const struct nla_policy pedit_policy[TCA_PEDIT_MAX + 1] = {
        [TCA_PEDIT_PARMS]       = { .len = sizeof(struct tc_pedit) },
 };
 
-static int tcf_pedit_init(struct nlattr *nla, struct nlattr *est,
-                         struct tc_action *a, int ovr, int bind)
+static int tcf_pedit_init(struct net *net, struct nlattr *nla,
+                         struct nlattr *est, struct tc_action *a,
+                         int ovr, int bind)
 {
        struct nlattr *tb[TCA_PEDIT_MAX + 1];
        struct tc_pedit *parm;
@@ -130,8 +131,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
        int i, munged = 0;
        unsigned int off;
 
-       if (skb_cloned(skb) &&
-           pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
+       if (skb_unclone(skb, GFP_ATOMIC))
                return p->tcf_action;
 
        off = skb_network_offset(skb);