aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2007-12-11 17:44:06 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-01-28 10:36:37 +0100
commit097c94a4e8bde978c8d12683d9a34048e9139e4b (patch)
tree1a90401134c5543dd78135f372842c9f5b232b58 /drivers/block/nbd.c
parent1c5093ba036b5e1a4befdcd6036d241178a720a8 (diff)
blk_end_request: changing nbd (take 4)
This patch converts nbd to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. Cc: Paul Clements <Paul.Clements@steeleye.com> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index ba9b17e507e..ae3106045ee 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -100,17 +100,15 @@ static const char *nbdcmd_to_ascii(int cmd)
static void nbd_end_request(struct request *req)
{
- int uptodate = (req->errors == 0) ? 1 : 0;
+ int error = req->errors ? -EIO : 0;
struct request_queue *q = req->q;
unsigned long flags;
dprintk(DBG_BLKDEV, "%s: request %p: %s\n", req->rq_disk->disk_name,
- req, uptodate? "done": "failed");
+ req, error ? "failed" : "done");
spin_lock_irqsave(q->queue_lock, flags);
- if (!end_that_request_first(req, uptodate, req->nr_sectors)) {
- end_that_request_last(req, uptodate);
- }
+ __blk_end_request(req, error, req->nr_sectors << 9);
spin_unlock_irqrestore(q->queue_lock, flags);
}