: remove noop_qdisc assignments in destroy functions
Subsystems (4)
PATCH 5/5 : remove noop_qdisc assignments in destroy functions
This patch removes useless noop_qdisc assignments in multiple qdiscs destroy functions, the memory where the pointer is stored is freed directly after the destroy function.
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/08/03 03:02:03+02:00 [email protected]
# [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions
#
# Signed-off-by: Patrick McHardy <[email protected]>
#
# net/sched/sch_tbf.c # 2004/08/03 03:01:39+02:00 [email protected] +0 -1 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_red.c # 2004/08/03 03:01:39+02:00 [email protected] +0 -5 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_prio.c # 2004/08/03 03:01:39+02:00 [email protected] +1 -3 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_netem.c # 2004/08/03 03:01:39+02:00 [email protected] +0 -2 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # # net/sched/sch_dsmark.c # 2004/08/03 03:01:39+02:00 [email protected] +0 -1 # [PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functions # diff -Nru a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c --- a/net/sched/sch_dsmark.c 2004-08-03 03:03:09 +02:00 +++ b/net/sched/sch_dsmark.c 2004-08-03 03:03:09 +02:00 @@ -383,7 +383,6 @@ tcf_destroy(tp); } qdisc_destroy(p->q); - p->q = &noop_qdisc; kfree(p->mask); }
net/sched/sch_netem.c +0 -2
@@ -812,9 +812,7 @@struct netem_sched_data *q = (struct netem_sched_data *)sch->data;del_timer_sync (&q->timer); -qdisc_destroy (q->qdisc); - q->qdisc = &noop_qdisc; }static int netem_dump (struct Qdisc *sch,struct sk_buff *skb)
net/sched/sch_prio.c +1 -3
@@ -208,10 +208,8 @@tcf_destroy (tp); } -for (prio=0 ; prio<q->bands; prio++) { +for (prio=0 ; prio<q->bands; prio++)qdisc_destroy (q->queues[prio]); - q->queues[prio] = &noop_qdisc; - } }static int prio_tune (struct Qdisc *sch,struct rtattr *opt)
net/sched/sch_red.c +0 -5
@@ -434,10 +434,6 @@return -1 ; } -static void red_destroy (struct Qdisc *sch) -{ -} -static struct Qdisc_ops red_qdisc_ops = { .next =NULL , .cl_ops =NULL ,
@@ -449,7 +445,6 @@ .drop = red_drop, .init = red_init, .reset = red_reset, - .destroy = red_destroy, .change = red_change, .dump = red_dump, .owner = THIS_MODULE,
net/sched/sch_tbf.c +0 -1
@@ -393,7 +393,6 @@qdisc_put_rtab (q->R_tab);qdisc_destroy (q->qdisc); - q->qdisc = &noop_qdisc; }static int tbf_dump (struct Qdisc *sch,struct sk_buff *skb)
David S. Miller
AppliedQuoted 3 lines · On Tue, 03 Aug 2004 17:25:54 +0200 Patrick McHardy <[email protected]> wrote:
This patch removes useless
noop_qdiscassignments in multiple qdiscs destroy functions, the memory where the pointer is stored is freed directly after the destroy function.
Applied.