]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: don't overwrite req->cmd_flags on sync cmd
authorAshok Vairavan <ashok.vairavan@oracle.com>
Fri, 26 Aug 2016 17:22:26 +0000 (10:22 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 30 Aug 2016 03:30:04 +0000 (20:30 -0700)
In __nvme_submit_sync_cmd, the request direction is overwritten when
the REQ_FAILFAST_DRIVER flag is set.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Fixes: 75619bfa904d0 ("NVMe: End sync requests immediately on failure")
Signed-off-by: Jens Axboe <axboe@fb.com>
  Orabug: 24561038
  Mainline Commit: e112af0dc9f55099b948e55077504a44b4162c79

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pci.c

index e0c325dace5db92026b0720d2523bd2c142c6abc..f25b81a28510ed0867f3eb24f5319dd090e7e52a 100644 (file)
@@ -1042,7 +1042,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
                return PTR_ERR(req);
 
        req->cmd_type = REQ_TYPE_SPECIAL;
-       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;