summaryrefslogtreecommitdiff
path: root/drivers/block/null_blk.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-06-03 10:38:05 +0300
committerJens Axboe <axboe@fb.com>2017-06-09 18:27:32 +0300
commitfc17b6534eb8395f0b3133eb31d87deec32c642b (patch)
tree18686a2326ebd60d68f144c70f83f4441c6b4e2f /drivers/block/null_blk.c
parent2a842acab109f40f0d7d10b38e9ca88390628996 (diff)
downloadlinux-fc17b6534eb8395f0b3133eb31d87deec32c642b.tar.xz
blk-mq: switch ->queue_rq return value to blk_status_t
Use the same values for use for request completion errors as the return value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause a requeue, and all the others are completed as-is. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/null_blk.c')
-rw-r--r--drivers/block/null_blk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index e6b81d370882..586dfff5d53f 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -356,7 +356,7 @@ static void null_request_fn(struct request_queue *q)
}
}
-static int null_queue_rq(struct blk_mq_hw_ctx *hctx,
+static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct nullb_cmd *cmd = blk_mq_rq_to_pdu(bd->rq);
@@ -373,7 +373,7 @@ static int null_queue_rq(struct blk_mq_hw_ctx *hctx,
blk_mq_start_request(bd->rq);
null_handle_cmd(cmd);
- return BLK_MQ_RQ_QUEUE_OK;
+ return BLK_STS_OK;
}
static void null_init_queue(struct nullb *nullb, struct nullb_queue *nq)