Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme: don't overwrite req->cmd_flags on sync cmd

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>

authored by

Matias Bjørling and committed by
Jens Axboe
e112af0d 2f17d71d

+1 -1
+1 -1
drivers/block/nvme-core.c
··· 1010 1010 return PTR_ERR(req); 1011 1011 1012 1012 req->cmd_type = REQ_TYPE_DRV_PRIV; 1013 - req->cmd_flags = REQ_FAILFAST_DRIVER; 1013 + req->cmd_flags |= REQ_FAILFAST_DRIVER; 1014 1014 req->__data_len = 0; 1015 1015 req->__sector = (sector_t) -1; 1016 1016 req->bio = req->biotail = NULL;