From e112af0dc9f55099b948e55077504a44b4162c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Date: Fri, 5 Jun 2015 14:54:24 +0200 Subject: [PATCH] nvme: don't overwrite req->cmd_flags on sync cmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In __nvme_submit_sync_cmd, the request direction is overwritten when the REQ_FAILFAST_DRIVER flag is set. Signed-off-by: Matias Bjørling Reviewed-by: Christoph Hellwig Fixes: 75619bfa904d0 ("NVMe: End sync requests immediately on failure") Signed-off-by: Jens Axboe --- drivers/block/nvme-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 2072ae81c13a..12d5b7b03f9b 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1010,7 +1010,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, return PTR_ERR(req); req->cmd_type = REQ_TYPE_DRV_PRIV; - req->cmd_flags = REQ_FAILFAST_DRIVER; + req->cmd_flags |= REQ_FAILFAST_DRIVER; req->__data_len = 0; req->__sector = (sector_t) -1; req->bio = req->biotail = NULL;