diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
commit | bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch) | |
tree | 427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /net/sched/cls_route.c | |
parent | 3d29cdff999c37b3876082278a8134a0642a02cd (diff) | |
parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/Makefile
drivers/usb/input/gtco.c
Diffstat (limited to 'net/sched/cls_route.c')
-rw-r--r-- | net/sched/cls_route.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index e85df07d8ce7..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,12 +89,12 @@ 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 void __inline__ | 97 | static inline void |
97 | route4_set_fastmap(struct route4_head *head, u32 id, int iif, | 98 | route4_set_fastmap(struct route4_head *head, u32 id, int iif, |
98 | struct route4_filter *f) | 99 | struct route4_filter *f) |
99 | { | 100 | { |
@@ -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 | ||