diff options
author | Mike Christie <mchristi@redhat.com> | 2016-06-05 22:32:17 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-07 22:41:38 +0300 |
commit | c2df40dfb8c015211ec55f4b1dd0587f875c7b34 (patch) | |
tree | 8660ea8a2a00b0248fa609e7e6b737a8d92306d9 /drivers/nvme/host | |
parent | d9d8c5c489f4969667a05727e9c2c4f78cffef1a (diff) | |
download | linux-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')
-rw-r--r-- | drivers/nvme/host/core.c | 2 | ||||
-rw-r--r-- | drivers/nvme/host/nvme.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 1a51584a382b..089b8b8aad4f 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -292,7 +292,7 @@ int nvme_setup_cmd(struct nvme_ns *ns, struct request *req, memcpy(cmd, req->cmd, sizeof(*cmd)); else if (req->cmd_flags & REQ_FLUSH) nvme_setup_flush(ns, cmd); - else if (req->cmd_flags & REQ_DISCARD) + else if (req_op(req) == REQ_OP_DISCARD) ret = nvme_setup_discard(ns, req, cmd); else nvme_setup_rw(ns, req, cmd); diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 1daa0482de0e..4d196d2d57da 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); } |