Skip to content

Commit d1671a9

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: pkt_sched: Fix build with NET_SCHED disabled.
2 parents ae0645a + 3a682fb commit d1671a9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

include/net/sch_generic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,10 @@ static inline unsigned int qdisc_pkt_len(struct sk_buff *skb)
333333

334334
static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
335335
{
336+
#ifdef CONFIG_NET_SCHED
336337
if (sch->stab)
337338
qdisc_calculate_pkt_len(skb, sch->stab);
339+
#endif
338340
return sch->enqueue(skb, sch);
339341
}
340342

net/sched/sch_generic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,9 @@ static void __qdisc_destroy(struct rcu_head *head)
469469
struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);
470470
const struct Qdisc_ops *ops = qdisc->ops;
471471

472+
#ifdef CONFIG_NET_SCHED
472473
qdisc_put_stab(qdisc->stab);
474+
#endif
473475
gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est);
474476
if (ops->reset)
475477
ops->reset(qdisc);

0 commit comments

Comments
 (0)