summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2016-06-05 19:32:17 (GMT)
committerJens Axboe <axboe@fb.com>2016-06-07 19:41:38 (GMT)
commitc2df40dfb8c015211ec55f4b1dd0587f875c7b34 (patch)
tree8660ea8a2a00b0248fa609e7e6b737a8d92306d9 /drivers/nvme/host/nvme.h
parentd9d8c5c489f4969667a05727e9c2c4f78cffef1a (diff)
downloadlinux-c2df40dfb8c015211ec55f4b1dd0587f875c7b34.tar.xz
drivers: use req op accessor
The req operation REQ_OP is separated from the rq_flag_bits definition. This converts the block layer drivers to use req_op to get the op from the request struct. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 1daa048..4d196d2 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -177,7 +177,7 @@ static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector)
static inline unsigned nvme_map_len(struct request *rq)
{
- if (rq->cmd_flags & REQ_DISCARD)
+ if (req_op(rq) == REQ_OP_DISCARD)
return sizeof(struct nvme_dsm_range);
else
return blk_rq_bytes(rq);
@@ -185,7 +185,7 @@ static inline unsigned nvme_map_len(struct request *rq)
static inline void nvme_cleanup_cmd(struct request *req)
{
- if (req->cmd_flags & REQ_DISCARD)
+ if (req_op(req) == REQ_OP_DISCARD)
kfree(req->completion_data);
}