diff options
Diffstat (limited to 'net/sched/cls_route.c')
-rw-r--r-- | net/sched/cls_route.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index abc47cc48ad0..cc941d0ee3a5 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/etherdevice.h> | 28 | #include <linux/etherdevice.h> |
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | #include <net/ip.h> | 30 | #include <net/ip.h> |
31 | #include <net/netlink.h> | ||
31 | #include <net/route.h> | 32 | #include <net/route.h> |
32 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
@@ -88,9 +89,9 @@ static __inline__ int route4_fastmap_hash(u32 id, int iif) | |||
88 | static inline | 89 | static inline |
89 | void route4_reset_fastmap(struct net_device *dev, struct route4_head *head, u32 id) | 90 | void route4_reset_fastmap(struct net_device *dev, struct route4_head *head, u32 id) |
90 | { | 91 | { |
91 | spin_lock_bh(&dev->queue_lock); | 92 | qdisc_lock_tree(dev); |
92 | memset(head->fastmap, 0, sizeof(head->fastmap)); | 93 | memset(head->fastmap, 0, sizeof(head->fastmap)); |
93 | spin_unlock_bh(&dev->queue_lock); | 94 | qdisc_unlock_tree(dev); |
94 | } | 95 | } |
95 | 96 | ||
96 | static inline void | 97 | static inline void |
@@ -562,7 +563,7 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh, | |||
562 | struct sk_buff *skb, struct tcmsg *t) | 563 | struct sk_buff *skb, struct tcmsg *t) |
563 | { | 564 | { |
564 | struct route4_filter *f = (struct route4_filter*)fh; | 565 | struct route4_filter *f = (struct route4_filter*)fh; |
565 | unsigned char *b = skb->tail; | 566 | unsigned char *b = skb_tail_pointer(skb); |
566 | struct rtattr *rta; | 567 | struct rtattr *rta; |
567 | u32 id; | 568 | u32 id; |
568 | 569 | ||
@@ -591,7 +592,7 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh, | |||
591 | if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0) | 592 | if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0) |
592 | goto rtattr_failure; | 593 | goto rtattr_failure; |
593 | 594 | ||
594 | rta->rta_len = skb->tail - b; | 595 | rta->rta_len = skb_tail_pointer(skb) - b; |
595 | 596 | ||
596 | if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0) | 597 | if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0) |
597 | goto rtattr_failure; | 598 | goto rtattr_failure; |
@@ -599,7 +600,7 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh, | |||
599 | return skb->len; | 600 | return skb->len; |
600 | 601 | ||
601 | rtattr_failure: | 602 | rtattr_failure: |
602 | skb_trim(skb, b - skb->data); | 603 | nlmsg_trim(skb, b); |
603 | return -1; | 604 | return -1; |
604 | } | 605 | } |
605 | 606 | ||