netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.4]: Don't try to destroy builtin qdiscs
@ 2004-11-05 19:46 Patrick McHardy
  2004-11-06  0:49 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2004-11-05 19:46 UTC (permalink / raw)
  To: David S. Miller; +Cc: Thomas Graf, netdev

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

Backported from Thomas's patch, we also need this for 2.4.





[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1124 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/11/05 20:44:30+01:00 kaber@coreworks.de 
#   [PKT_SCHED]: Don't try to destroy builtin qdiscs
#   
#   Backported from Thomas Graf's fix for 2.6.
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/sched/sch_generic.c
#   2004/11/05 20:44:28+01:00 kaber@coreworks.de +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 <kaber@trash.net>
# 
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);
 }
 
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.4]: Don't try to destroy builtin qdiscs
  2004-11-05 19:46 [PATCH 2.4]: Don't try to destroy builtin qdiscs Patrick McHardy
@ 2004-11-06  0:49 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-11-06  0:49 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: tgraf, netdev

On Fri, 05 Nov 2004 20:46:31 +0100
Patrick McHardy <kaber@trash.net> 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 :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-06  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-05 19:46 [PATCH 2.4]: Don't try to destroy builtin qdiscs Patrick McHardy
2004-11-06  0:49 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).