|
@@ -193,10 +193,9 @@ EXPORT_SYMBOL_GPL(nvme_requeue_req);
|
|
|
struct request *nvme_alloc_request(struct request_queue *q,
|
|
|
struct nvme_command *cmd, unsigned int flags)
|
|
|
{
|
|
|
- bool write = cmd->common.opcode & 1;
|
|
|
struct request *req;
|
|
|
|
|
|
- req = blk_mq_alloc_request(q, write, flags);
|
|
|
+ req = blk_mq_alloc_request(q, nvme_is_write(cmd), flags);
|
|
|
if (IS_ERR(req))
|
|
|
return req;
|
|
|
|
|
@@ -361,7 +360,7 @@ int __nvme_submit_user_cmd(struct request_queue *q, struct nvme_command *cmd,
|
|
|
void __user *meta_buffer, unsigned meta_len, u32 meta_seed,
|
|
|
u32 *result, unsigned timeout)
|
|
|
{
|
|
|
- bool write = cmd->common.opcode & 1;
|
|
|
+ bool write = nvme_is_write(cmd);
|
|
|
struct nvme_completion cqe;
|
|
|
struct nvme_ns *ns = q->queuedata;
|
|
|
struct gendisk *disk = ns ? ns->disk : NULL;
|