diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_route.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index 5a16ca28aa3d..481260a4f10f 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c | |||
@@ -73,11 +73,13 @@ static __inline__ int route4_fastmap_hash(u32 id, int iif) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | static inline | 75 | static inline |
76 | void route4_reset_fastmap(struct net_device *dev, struct route4_head *head, u32 id) | 76 | void route4_reset_fastmap(struct Qdisc *q, struct route4_head *head, u32 id) |
77 | { | 77 | { |
78 | qdisc_lock_tree(dev); | 78 | spinlock_t *root_lock = qdisc_root_lock(q); |
79 | |||
80 | spin_lock_bh(root_lock); | ||
79 | memset(head->fastmap, 0, sizeof(head->fastmap)); | 81 | memset(head->fastmap, 0, sizeof(head->fastmap)); |
80 | qdisc_unlock_tree(dev); | 82 | spin_unlock_bh(root_lock); |
81 | } | 83 | } |
82 | 84 | ||
83 | static inline void | 85 | static inline void |
@@ -302,7 +304,7 @@ static int route4_delete(struct tcf_proto *tp, unsigned long arg) | |||
302 | *fp = f->next; | 304 | *fp = f->next; |
303 | tcf_tree_unlock(tp); | 305 | tcf_tree_unlock(tp); |
304 | 306 | ||
305 | route4_reset_fastmap(qdisc_dev(tp->q), head, f->id); | 307 | route4_reset_fastmap(tp->q, head, f->id); |
306 | route4_delete_filter(tp, f); | 308 | route4_delete_filter(tp, f); |
307 | 309 | ||
308 | /* Strip tree */ | 310 | /* Strip tree */ |
@@ -500,7 +502,7 @@ reinsert: | |||
500 | } | 502 | } |
501 | tcf_tree_unlock(tp); | 503 | tcf_tree_unlock(tp); |
502 | 504 | ||
503 | route4_reset_fastmap(qdisc_dev(tp->q), head, f->id); | 505 | route4_reset_fastmap(tp->q, head, f->id); |
504 | *arg = (unsigned long)f; | 506 | *arg = (unsigned long)f; |
505 | return 0; | 507 | return 0; |
506 | 508 | ||