All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] loop: return proper error from loop_queue_rq()
@ 2016-11-14 22:56 Omar Sandoval
  2016-11-14 22:58 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Sandoval @ 2016-11-14 22:56 UTC (permalink / raw)
  To: linux-block; +Cc: kernel-team, Ming Lei

From: Omar Sandoval <osandov@fb.com>

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

f4aa4c7bbac6 ("block: loop: convert to per-device workqueue")
Signed-off-by: Omar Sandoval <osandov@fb.com>
---
 drivers/block/loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index fa1b7a9..4af8187 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1646,7 +1646,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;
 
 	switch (req_op(cmd->rq)) {
 	case REQ_OP_FLUSH:
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-14 22:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 22:56 [PATCH] loop: return proper error from loop_queue_rq() Omar Sandoval
2016-11-14 22:58 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.