Commit b3409ef1 authored by Omar Sandoval's avatar Omar Sandoval Committed by Sasha Levin

loop: return proper error from loop_queue_rq()

[ Upstream commit b4a567e8 ]

->queue_rq() should return one of the BLK_MQ_RQ_QUEUE_* constants, not
an errno.

f4aa4c7b ("block: loop: convert to per-device workqueue")
Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 9e19c284
......@@ -1436,7 +1436,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 (cmd->rq->cmd_flags & REQ_WRITE) {
struct loop_device *lo = cmd->rq->q->queuedata;
......
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