From: Kiyoshi Ueda Date: Tue, 11 Dec 2007 22:44:06 +0000 (-0500) Subject: blk_end_request: changing nbd (take 4) X-Git-Tag: v2.6.25-rc1~1172^2~22 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=097c94a4e8bde978c8d12683d9a34048e9139e4b;p=linux-2.6 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 Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index ba9b17e507..ae3106045e 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); }