summaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-06 16:51:57 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-06 16:51:57 +0200
commit7f79d852ed30a06eebf7497afe9334a726db3d40 (patch)
tree0057281f17501b635d3d88cda9a14203706f5dcc /include/net/sch_generic.h
parentsched: clean up __might_sleep() (diff)
parentdrivers/mmc/card/block.c: fix refcount leak in mmc_block_open() (diff)
downloadlinux-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.h12
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)