: Don't try to destroy builtin qdiscs
Subsystems (2)
PATCH 1/1 : Don't try to destroy builtin qdiscs
Backported from Thomas's patch, we also need this for 2.4.
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/11/05 20:44:30+01:00 [email protected]
# [PKT_SCHED]: Don't try to destroy builtin qdiscs
#
# Backported from Thomas Graf's fix for 2.6.
#
# Signed-off-by: Patrick McHardy <[email protected]>
#
# net/sched/sch_generic.c # 2004/11/05 20:44:28+01:00 [email protected] +3 -3 # [PKT_SCHED]: Don't try to destroy builtin qdiscs # # Backported from Thomas Graf's fix for 2.6. # # Signed-off-by: Patrick McHardy <[email protected]> # diff -Nru a/net/sched/sch_generic.c b/net/sched/sch_generic.c --- a/net/sched/sch_generic.c 2004-11-05 20:44:43 +01:00 +++ b/net/sched/sch_generic.c 2004-11-05 20:44:43 +01:00 @@ -423,7 +423,8 @@ { struct Qdisc_ops *ops = qdisc->ops;
- if (!atomic_dec_and_test(&qdisc->refcnt))
+ if (qdisc->flags&TCQ_F_BUILTIN ||
+ !atomic_dec_and_test(&qdisc->refcnt))
return;
list_del(&qdisc->list);
#ifdef CONFIG_NET_ESTIMATOR
@@ -433,8 +434,7 @@
ops->reset(qdisc);
if (ops->destroy)
ops->destroy(qdisc);
- if (!(qdisc->flags&TCQ_F_BUILTIN))
- kfree(qdisc);
+ kfree(qdisc);
}
Quoted 1 line · On Fri, 05 Nov 2004 20:46:31 +0100 Patrick McHardy <[email protected]> wrote:
Backported from Thomas's patch, we also need this for 2.4.
Applied, thanks Patrick.
(BTW, please use my davemloft.net email address, it is what
I list in the MAINTAINERS and CREDITS file :-)