diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-06 16:51:57 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-06 16:51:57 +0200 |
commit | 7f79d852ed30a06eebf7497afe9334a726db3d40 (patch) | |
tree | 0057281f17501b635d3d88cda9a14203706f5dcc /include/net/sch_generic.h | |
parent | sched: clean up __might_sleep() (diff) | |
parent | drivers/mmc/card/block.c: fix refcount leak in mmc_block_open() (diff) | |
download | linux-7f79d852ed30a06eebf7497afe9334a726db3d40.tar.xz linux-7f79d852ed30a06eebf7497afe9334a726db3d40.zip |
Merge branch 'linus' into sched/devel
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 b1d2cfea89c5..e5569625d2a5 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) |