Commit 15b458fa authored by David S. Miller's avatar David S. Miller

pkt_sched: Kill qdisc_lock_tree usage in cls_route.c

It just wants the qdisc tree to be synchronized, so grabbing
qdisc_root_lock() is sufficient.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 55dbc640
...@@ -73,11 +73,13 @@ static __inline__ int route4_fastmap_hash(u32 id, int iif) ...@@ -73,11 +73,13 @@ static __inline__ int route4_fastmap_hash(u32 id, int iif)
} }
static inline static inline
void route4_reset_fastmap(struct net_device *dev, struct route4_head *head, u32 id) void route4_reset_fastmap(struct Qdisc *q, struct route4_head *head, u32 id)
{ {
qdisc_lock_tree(dev); spinlock_t *root_lock = qdisc_root_lock(q);
spin_lock_bh(root_lock);
memset(head->fastmap, 0, sizeof(head->fastmap)); memset(head->fastmap, 0, sizeof(head->fastmap));
qdisc_unlock_tree(dev); spin_unlock_bh(root_lock);
} }
static inline void static inline void
...@@ -302,7 +304,7 @@ static int route4_delete(struct tcf_proto *tp, unsigned long arg) ...@@ -302,7 +304,7 @@ static int route4_delete(struct tcf_proto *tp, unsigned long arg)
*fp = f->next; *fp = f->next;
tcf_tree_unlock(tp); tcf_tree_unlock(tp);
route4_reset_fastmap(qdisc_dev(tp->q), head, f->id); route4_reset_fastmap(tp->q, head, f->id);
route4_delete_filter(tp, f); route4_delete_filter(tp, f);
/* Strip tree */ /* Strip tree */
...@@ -500,7 +502,7 @@ static int route4_change(struct tcf_proto *tp, unsigned long base, ...@@ -500,7 +502,7 @@ static int route4_change(struct tcf_proto *tp, unsigned long base,
} }
tcf_tree_unlock(tp); tcf_tree_unlock(tp);
route4_reset_fastmap(qdisc_dev(tp->q), head, f->id); route4_reset_fastmap(tp->q, head, f->id);
*arg = (unsigned long)f; *arg = (unsigned long)f;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment