From 560b11d0ee59be9f0bc37d56eb3e7475c7e6c92b Mon Sep 17 00:00:00 2001 From: Jarek Poplawski Date: Sun, 13 Sep 2009 22:35:44 +0000 Subject: [PATCH] --- yaml --- r: 162874 b: refs/heads/master c: 036d6a673fa0a2e2c5b72a3b1d1b86114c1711c0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/sched/sch_api.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f3702d70d2c3..6fbbd5feb69b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d314737ad3bad6b4603b243fd6db572385259690 +refs/heads/master: 036d6a673fa0a2e2c5b72a3b1d1b86114c1711c0 diff --git a/trunk/net/sched/sch_api.c b/trunk/net/sched/sch_api.c index 692d9a41cd23..c6e4063f698c 100644 --- a/trunk/net/sched/sch_api.c +++ b/trunk/net/sched/sch_api.c @@ -693,13 +693,18 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, if (new && i > 0) atomic_inc(&new->refcnt); - qdisc_destroy(old); + if (!ingress) + qdisc_destroy(old); } - notify_and_destroy(skb, n, classid, dev->qdisc, new); - if (new && !new->ops->attach) - atomic_inc(&new->refcnt); - dev->qdisc = new ? : &noop_qdisc; + if (!ingress) { + notify_and_destroy(skb, n, classid, dev->qdisc, new); + if (new && !new->ops->attach) + atomic_inc(&new->refcnt); + dev->qdisc = new ? : &noop_qdisc; + } else { + notify_and_destroy(skb, n, classid, old, new); + } if (dev->flags & IFF_UP) dev_activate(dev);