summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_cgroup.c
diff options
context:
space:
mode:
authorJiri Pirko2014-12-09 22:23:29 +0100
committerDavid S. Miller2014-12-10 03:49:58 +0100
commit6ea3b446b9369c971bcab2a723d814d2295c77d3 (patch)
treecd245bff2e8eec5a08909211399f1c88ade08ef4 /net/sched/cls_cgroup.c
parentamd-xgbe: Use disable_irq_nosync when in IRQ context (diff)
downloadkernel-qcow2-linux-6ea3b446b9369c971bcab2a723d814d2295c77d3.tar.gz
kernel-qcow2-linux-6ea3b446b9369c971bcab2a723d814d2295c77d3.tar.xz
kernel-qcow2-linux-6ea3b446b9369c971bcab2a723d814d2295c77d3.zip
net: sched: cls: use nla_nest_cancel instead of nlmsg_trim
To cancel nesting, this function is more convenient. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_cgroup.c')
-rw-r--r--net/sched/cls_cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 741bfa7debb2..221697ab0247 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -177,7 +177,6 @@ static int cls_cgroup_dump(struct net *net, struct tcf_proto *tp, unsigned long
struct sk_buff *skb, struct tcmsg *t)
{
struct cls_cgroup_head *head = rtnl_dereference(tp->root);
- unsigned char *b = skb_tail_pointer(skb);
struct nlattr *nest;
t->tcm_handle = head->handle;
@@ -198,7 +197,7 @@ static int cls_cgroup_dump(struct net *net, struct tcf_proto *tp, unsigned long
return skb->len;
nla_put_failure:
- nlmsg_trim(skb, b);
+ nla_nest_cancel(skb, nest);
return -1;
}