diff options
-rw-r--r-- | include/net/sch_generic.h | 6 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 49534e28824b..a4c0f1649e2b 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -97,7 +97,11 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) { if (qdisc_is_running(qdisc)) return false; - write_seqcount_begin(&qdisc->running); + /* Variant of write_seqcount_begin() telling lockdep a trylock + * was attempted. + */ + raw_write_seqcount_begin(&qdisc->running); + seqcount_acquire(&qdisc->running.dep_map, 0, 1, _RET_IP_); return true; } diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index cebea73e70ac..cad810b45e31 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -137,10 +137,10 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, HARD_TX_UNLOCK(dev, txq); } else { - spin_lock_nested(root_lock, SINGLE_DEPTH_NESTING); + spin_lock(root_lock); return qdisc_qlen(q); } - spin_lock_nested(root_lock, SINGLE_DEPTH_NESTING); + spin_lock(root_lock); if (dev_xmit_complete(ret)) { /* Driver sent out skb successfully or skb was consumed */ |