[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081001.101302.104028547.k-ueda@ct.jp.nec.com>
Date: Wed, 01 Oct 2008 10:13:02 -0400 (EDT)
From: Kiyoshi Ueda <k-ueda@...jp.nec.com>
To: jens.axboe@...cle.com
Cc: rusty@...tcorp.com.au, oakad@...oo.com, adrian@...en.demon.co.uk,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
j-nomura@...jp.nec.com, k-ueda@...jp.nec.com
Subject: [PATCH 3/5] gdrom: change to use __blk_end_request()
This patch converts gdrom to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
gd.transfer is '1' in error cases and '0' in non-error cases,
so gdrom hasn't been propagating any error code to the block layer.
We can just convert error cases to '-EIO'.
Signed-off-by: Kiyoshi Ueda <k-ueda@...jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@...jp.nec.com>
Cc: Adrian McMenamin <adrian@...en.demon.co.uk>
Cc: Jens Axboe <jens.axboe@...cle.com>
---
drivers/cdrom/gdrom.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-block/drivers/cdrom/gdrom.c
===================================================================
--- linux-2.6-block.orig/drivers/cdrom/gdrom.c
+++ linux-2.6-block/drivers/cdrom/gdrom.c
@@ -624,14 +624,14 @@ static void gdrom_readdisk_dma(struct wo
ctrl_outb(1, GDROM_DMA_STATUS_REG);
wait_event_interruptible_timeout(request_queue,
gd.transfer == 0, GDROM_DEFAULT_TIMEOUT);
- err = gd.transfer;
+ err = gd.transfer ? -EIO : 0;
gd.transfer = 0;
gd.pending = 0;
/* now seek to take the request spinlock
* before handling ending the request */
spin_lock(&gdrom_lock);
list_del_init(&req->queuelist);
- end_dequeued_request(req, 1 - err);
+ __blk_end_request(req, err, blk_rq_bytes(req));
}
spin_unlock(&gdrom_lock);
kfree(read_command);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists