Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-09-10 15:52:01 +0200
committerTakashi Iwai <tiwai@suse.de>2019-09-10 15:52:44 +0200
commit697cb5e5c80d56d5b3d7e7d6a6df15765f8f0a04 (patch)
tree4b029781594018b8b0b901f45ef6b4dec95e3d72
parent9bd7e5de9ddd66dd90f7e21820d20bcb4c69b241 (diff)
parent9e76b3d11462bbfdcadcf93460c9700647b73392 (diff)
Merge branch 'users/hare/SLE15/for-next' into SLE15
Pull blk-mq/nvme fixes from Hannes Reinecke suse-commit: 3325df7234b2e4b88a757a14a2e267a219e5077c
-rw-r--r--block/blk-mq.c7
-rw-r--r--drivers/nvme/host/core.c2
-rw-r--r--include/linux/blk-mq.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 15ebbbb4ca2a..1ea504b789c0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -588,6 +588,13 @@ void blk_mq_complete_request(struct request *rq)
}
EXPORT_SYMBOL(blk_mq_complete_request);
+void blk_mq_complete_request_sync(struct request *rq)
+{
+ if (!blk_mark_rq_complete(rq))
+ rq->q->mq_ops->complete(rq);
+}
+EXPORT_SYMBOL_GPL(blk_mq_complete_request_sync);
+
int blk_mq_request_started(struct request *rq)
{
return test_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 12f8f3a3eb76..9155d84e94cd 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -285,7 +285,7 @@ void nvme_cancel_request(struct request *req, void *data, bool reserved)
"Cancelling I/O %d", req->tag);
nvme_req(req)->status = NVME_SC_ABORT_REQ;
- blk_mq_complete_request(req);
+ blk_mq_complete_request_sync(req);
}
EXPORT_SYMBOL_GPL(nvme_cancel_request);
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index cfd64e500d82..346f03e240be 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -237,7 +237,7 @@ void blk_mq_add_to_requeue_list(struct request *rq, bool at_head,
void blk_mq_kick_requeue_list(struct request_queue *q);
void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
void blk_mq_complete_request(struct request *rq);
-
+void blk_mq_complete_request_sync(struct request *rq);
bool blk_mq_queue_stopped(struct request_queue *q);
void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);