pkt_sched: Add and use qdisc_root() and qdisc_root_lock().
When code wants to lock the qdisc tree state, the logic operation it's doing is locking the top-level qdisc that sits of the root of the netdev_queue. Add qdisc_root_lock() to represent this and convert the easiest cases. In order for this to work out in all cases, we have to hook up the noop_qdisc to a dummy netdev_queue. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1045,7 +1045,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
||||
|
||||
if (tca[TCA_RATE])
|
||||
gen_replace_estimator(&cl->bstats, &cl->rate_est,
|
||||
&sch->dev_queue->lock,
|
||||
qdisc_root_lock(sch),
|
||||
tca[TCA_RATE]);
|
||||
return 0;
|
||||
}
|
||||
@@ -1104,7 +1104,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
||||
|
||||
if (tca[TCA_RATE])
|
||||
gen_new_estimator(&cl->bstats, &cl->rate_est,
|
||||
&sch->dev_queue->lock, tca[TCA_RATE]);
|
||||
qdisc_root_lock(sch), tca[TCA_RATE]);
|
||||
*arg = (unsigned long)cl;
|
||||
return 0;
|
||||
}
|
||||
|
Viittaa uudesa ongelmassa
Block a user