From: Jens Axboe <axboe@suse.de>
To: Shailabh Nagar <nagar@watson.ibm.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: noop insert
Date: Fri, 24 Dec 2004 11:07:13 +0100 [thread overview]
Message-ID: <20041224100711.GA2100@suse.de> (raw)
In-Reply-To: <41CAEBD4.8030609@watson.ibm.com>
On Thu, Dec 23 2004, Shailabh Nagar wrote:
> In noop-iosched.c (2.6.10-rc2),
>
> void elevator_noop_add_request(request_queue_t *q, struct request *rq,
> int where)
> {
> struct list_head *insert = q->queue_head.prev;
>
> if (where == ELEVATOR_INSERT_FRONT)
> insert = &q->queue_head;
>
> list_add_tail(&rq->queuelist, &q->queue_head);
> <snip>
>
> shouldn't the insertion happen at insert instead of q->queue_head ?
Yeah, it looks broken. This is easier to read and correct :-)
===== drivers/block/noop-iosched.c 1.4 vs edited =====
--- 1.4/drivers/block/noop-iosched.c 2004-10-19 11:40:17 +02:00
+++ edited/drivers/block/noop-iosched.c 2004-12-24 11:06:18 +01:00
@@ -59,12 +59,10 @@
void elevator_noop_add_request(request_queue_t *q, struct request *rq,
int where)
{
- struct list_head *insert = q->queue_head.prev;
-
if (where == ELEVATOR_INSERT_FRONT)
- insert = &q->queue_head;
-
- list_add_tail(&rq->queuelist, &q->queue_head);
+ list_add(&rq->queuelist, &q->queue_head);
+ else
+ list_add_tail(&rq->queuelist, &q->queue_head);
/*
* new merges must not precede this barrier
Signed-off-by: Jens Axboe <axboe@suse.de>
--
Jens Axboe
prev parent reply other threads:[~2004-12-24 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-23 16:01 noop insert Shailabh Nagar
2004-12-24 10:07 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041224100711.GA2100@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nagar@watson.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.