[NETLINK]: Use nlmsg_trim() where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a36ca73337
commit
dc5fc579b9
@ -50,6 +50,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <net/netlink.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <linux/rbtree.h>
|
||||
@ -1128,7 +1129,7 @@ static int htb_dump(struct Qdisc *sch, struct sk_buff *skb)
|
||||
return skb->len;
|
||||
rtattr_failure:
|
||||
spin_unlock_bh(&sch->dev->queue_lock);
|
||||
skb_trim(skb, skb_tail_pointer(skb) - skb->data);
|
||||
nlmsg_trim(skb, skb_tail_pointer(skb));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1164,7 +1165,7 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg,
|
||||
return skb->len;
|
||||
rtattr_failure:
|
||||
spin_unlock_bh(&sch->dev->queue_lock);
|
||||
skb_trim(skb, b - skb->data);
|
||||
nlmsg_trim(skb, b);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user