diff options
author | Simon Horman <horms@verge.net.au> | 2008-08-27 22:47:46 +1000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-08-27 22:47:46 +1000 |
commit | b18e30412dde08536c9df6eae3f571fddb560e7f (patch) | |
tree | 1ca4e3ea848d3035311f29a6f03cb884e82e6639 /include/net/sch_generic.h | |
parent | 09bf825e8e3049db1d72d464d0a6b857cc037a43 (diff) | |
parent | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b1d2cfea89c..e5569625d2a 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -217,6 +217,14 @@ static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) return qdisc_lock(root); } +static inline spinlock_t *qdisc_root_sleeping_lock(struct Qdisc *qdisc) +{ + struct Qdisc *root = qdisc_root_sleeping(qdisc); + + ASSERT_RTNL(); + return qdisc_lock(root); +} + static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) { return qdisc->dev_queue->dev; @@ -224,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) |