diff options
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d6247a3c40df..135f5a2dd931 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -100,6 +100,13 @@ struct Qdisc { spinlock_t busylock ____cacheline_aligned_in_smp; }; +static inline void qdisc_refcount_inc(struct Qdisc *qdisc) +{ + if (qdisc->flags & TCQ_F_BUILTIN) + return; + refcount_inc(&qdisc->refcnt); +} + static inline bool qdisc_is_running(const struct Qdisc *qdisc) { return (raw_read_seqcount(&qdisc->running) & 1) ? true : false; |