diff options
author | <jgarzik@pretzel.yyz.us> | 2005-06-03 00:43:09 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-03 00:43:09 +0200 |
commit | d7aaf48128ec7fcefcee92ea22833afc1a80e268 (patch) | |
tree | 16ff78f6be6a5519944bb7bfc6034dfbd71ae97f /net/sched/sch_dsmark.c | |
parent | libata: kernel-doc warning fixes (diff) | |
parent | [PATCH] ppc64: Fix result code handling in prom_init (diff) | |
download | linux-d7aaf48128ec7fcefcee92ea22833afc1a80e268.tar.xz linux-d7aaf48128ec7fcefcee92ea22833afc1a80e268.zip |
Automatic merge of /spare/repo/linux-2.6/.git branch HEAD
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 8a3db9d95bab..d8bd2a569c7c 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -18,7 +18,7 @@ #include <asm/byteorder.h> -#if 1 /* control */ +#if 0 /* control */ #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) #else #define DPRINTK(format,args...) @@ -73,8 +73,13 @@ static int dsmark_graft(struct Qdisc *sch,unsigned long arg, DPRINTK("dsmark_graft(sch %p,[qdisc %p],new %p,old %p)\n",sch,p,new, old); - if (!new) - new = &noop_qdisc; + + if (new == NULL) { + new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops); + if (new == NULL) + new = &noop_qdisc; + } + sch_tree_lock(sch); *old = xchg(&p->q,new); if (*old) @@ -163,14 +168,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker) return; for (i = 0; i < p->indices; i++) { if (p->mask[i] == 0xff && !p->value[i]) - continue; + goto ignore; if (walker->count >= walker->skip) { if (walker->fn(sch, i+1, walker) < 0) { walker->stop = 1; break; } } - walker->count++; +ignore: + walker->count++; } } |