diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-08-27 02:27:10 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-27 02:27:10 -0700 |
commit | fe439dd09d3e4da6a44d35df7371b9c6a2661b99 (patch) | |
tree | e37911e7a8535f662beec78cbb41a9afc1c070f7 /include | |
parent | f6f9b93f1624206c802ac9162c9302edaf59bfd9 (diff) | |
download | linux-fe439dd09d3e4da6a44d35df7371b9c6a2661b99.tar.gz linux-fe439dd09d3e4da6a44d35df7371b9c6a2661b99.tar.bz2 linux-fe439dd09d3e4da6a44d35df7371b9c6a2661b99.zip |
pkt_sched: Fix sch_tree_lock()
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sch_generic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ef8a7e2e12e7..e5569625d2a5 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -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) |