]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pkt_sched: Fix sch_tree_lock()
authorJarek Poplawski <jarkao2@gmail.com>
Wed, 27 Aug 2008 09:27:10 +0000 (02:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Aug 2008 09:27:10 +0000 (02:27 -0700)
Use new qdisc_root_sleeping_lock() instead of qdisc_root_lock() as
sch_tree_lock() because this lock could be used while dev is
deactivated, but we never need to use this with noop_qdisc as a root.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h

index ef8a7e2e12e75c2211a57a259e3e9bd8be4d7d9c..e5569625d2a50db02b290a5d9c339808be17a86b 100644 (file)
@@ -232,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc)
 
 static inline void sch_tree_lock(struct Qdisc *q)
 {
-       spin_lock_bh(qdisc_root_lock(q));
+       spin_lock_bh(qdisc_root_sleeping_lock(q));
 }
 
 static inline void sch_tree_unlock(struct Qdisc *q)
 {
-       spin_unlock_bh(qdisc_root_lock(q));
+       spin_unlock_bh(qdisc_root_sleeping_lock(q));
 }
 
 #define tcf_tree_lock(tp)      sch_tree_lock((tp)->q)