Commit 7afb3a6e authored by Kiyoshi Ueda's avatar Kiyoshi Ueda Committed by Jens Axboe
Browse files

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: default avatarKiyoshi Ueda <>
Signed-off-by: default avatarJun'ichi Nomura <>
Cc: Adrian McMenamin <>
Signed-off-by: default avatarJens Axboe <>
parent 2a9df505
......@@ -624,14 +624,14 @@ static void gdrom_readdisk_dma(struct work_struct *work)
ctrl_outb(1, GDROM_DMA_STATUS_REG);
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 */
end_dequeued_request(req, 1 - err);
__blk_end_request(req, err, blk_rq_bytes(req));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment