]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pkt_sched: Fix build with NET_SCHED disabled.
authorDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2008 01:13:01 +0000 (18:13 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2008 01:13:01 +0000 (18:13 -0700)
The stab bits can't be referenced uniless the full
packet scheduler layer is enabled.

Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/sch_generic.c

index db9ad655eb8aa089c1c0936f5307c1453a7c90bd..b5f40d7ef724f344be5df5c3648609d5ef282f5d 100644 (file)
@@ -333,8 +333,10 @@ static inline unsigned int qdisc_pkt_len(struct sk_buff *skb)
 
 static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
+#ifdef CONFIG_NET_SCHED
        if (sch->stab)
                qdisc_calculate_pkt_len(skb, sch->stab);
+#endif
        return sch->enqueue(skb, sch);
 }
 
index 27a51f04db49d76cbfd7c6fb307167743387c57b..0ddf69286f9233ce196bef1953f819f0527a543e 100644 (file)
@@ -469,7 +469,9 @@ static void __qdisc_destroy(struct rcu_head *head)
        struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);
        const struct Qdisc_ops  *ops = qdisc->ops;
 
+#ifdef CONFIG_NET_SCHED
        qdisc_put_stab(qdisc->stab);
+#endif
        gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est);
        if (ops->reset)
                ops->reset(qdisc);