diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2020-11-09 18:24:02 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-12-01 20:36:36 +0100 |
commit | 06b3bec8204b4c6433ccb2f6ec60fedb77b34cb3 (patch) | |
tree | a3d2e4e6c2f9a504ab8c7a36f976df268b31c8e4 /drivers/nvme | |
parent | 39dfe84451b4526a8054cc5a127337bca980dfa3 (diff) |
nvmet: remove op_flags for passthru commands
For passthru commands setting op_flags has no meaning. Remove the code
that sets the op flags in nvmet_passthru_map_sg().
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/passthru.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index be8ae59dcb71..1c84dadfb38f 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -188,21 +188,15 @@ static void nvmet_passthru_req_done(struct request *rq, static int nvmet_passthru_map_sg(struct nvmet_req *req, struct request *rq) { struct scatterlist *sg; - int op_flags = 0; struct bio *bio; int i, ret; if (req->sg_cnt > BIO_MAX_PAGES) return -EINVAL; - if (req->cmd->common.opcode == nvme_cmd_flush) - op_flags = REQ_FUA; - else if (nvme_is_write(req->cmd)) - op_flags = REQ_SYNC | REQ_IDLE; - bio = bio_alloc(GFP_KERNEL, req->sg_cnt); bio->bi_end_io = bio_put; - bio->bi_opf = req_op(rq) | op_flags; + bio->bi_opf = req_op(rq); for_each_sg(req->sg, sg, req->sg_cnt, i) { if (bio_add_pc_page(rq->q, bio, sg_page(sg), sg->length, |