summaryrefslogtreecommitdiffstats
path: root/kernel/net/sched/sch_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/sched/sch_generic.c')
-rw-r--r--kernel/net/sched/sch_generic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/net/sched/sch_generic.c b/kernel/net/sched/sch_generic.c
index 47ef1b11b..00b81cab2 100644
--- a/kernel/net/sched/sch_generic.c
+++ b/kernel/net/sched/sch_generic.c
@@ -159,12 +159,15 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
if (validate)
skb = validate_xmit_skb_list(skb, dev);
- if (skb) {
+ if (likely(skb)) {
HARD_TX_LOCK(dev, txq, smp_processor_id());
if (!netif_xmit_frozen_or_stopped(txq))
skb = dev_hard_start_xmit(skb, dev, txq, &ret);
HARD_TX_UNLOCK(dev, txq);
+ } else {
+ spin_lock(root_lock);
+ return qdisc_qlen(q);
}
spin_lock(root_lock);