diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:17:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:17:20 -0400 |
commit | d1671a9c15f55a1475d41269494518e348880c33 (patch) | |
tree | 140dec7fc0a8eaddc0f529e1790f888811de53a7 | |
parent | ae0645a451b02ad35c520b01177b70ebd59c91ab (diff) | |
parent | 3a682fbd732d3d27bec722a923952b0938e8a404 (diff) |
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.
-rw-r--r-- | include/net/sch_generic.h | 2 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index db9ad655eb8a..b5f40d7ef724 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -333,8 +333,10 @@ static inline unsigned int qdisc_pkt_len(struct sk_buff *skb) | |||
333 | 333 | ||
334 | static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch) | 334 | static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch) |
335 | { | 335 | { |
336 | #ifdef CONFIG_NET_SCHED | ||
336 | if (sch->stab) | 337 | if (sch->stab) |
337 | qdisc_calculate_pkt_len(skb, sch->stab); | 338 | qdisc_calculate_pkt_len(skb, sch->stab); |
339 | #endif | ||
338 | return sch->enqueue(skb, sch); | 340 | return sch->enqueue(skb, sch); |
339 | } | 341 | } |
340 | 342 | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 27a51f04db49..0ddf69286f92 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -469,7 +469,9 @@ static void __qdisc_destroy(struct rcu_head *head) | |||
469 | struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu); | 469 | struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu); |
470 | const struct Qdisc_ops *ops = qdisc->ops; | 470 | const struct Qdisc_ops *ops = qdisc->ops; |
471 | 471 | ||
472 | #ifdef CONFIG_NET_SCHED | ||
472 | qdisc_put_stab(qdisc->stab); | 473 | qdisc_put_stab(qdisc->stab); |
474 | #endif | ||
473 | gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est); | 475 | gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est); |
474 | if (ops->reset) | 476 | if (ops->reset) |
475 | ops->reset(qdisc); | 477 | ops->reset(qdisc); |