summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-11-14 14:56:17 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-06 11:16:14 +0100
commitffef1630187bd6ed8521a90d8dfcd27bd8c8cf36 (patch)
treeab7db5390ce4f3cb39009782c0e9e29c40450f45 /drivers/block
parent011ded975e347d6ef14f7d08018f3d4750483160 (diff)
loop: return proper error from loop_queue_rq()
commit b4a567e8114327518c09f5632339a5954ab975a3 upstream. ->queue_rq() should return one of the BLK_MQ_RQ_QUEUE_* constants, not an errno. Fixes: f4aa4c7bbac6 ("block: loop: convert to per-device workqueue") Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 80cf8add46ff..ab0b2dd3f629 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1657,7 +1657,7 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx,
blk_mq_start_request(bd->rq);
if (lo->lo_state != Lo_bound)
- return -EIO;
+ return BLK_MQ_RQ_QUEUE_ERROR;
if (lo->use_dio && !(cmd->rq->cmd_flags & (REQ_FLUSH |
REQ_DISCARD)))