Commit 242e461f authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

lightnvm: Remove redundant rq->__data_len initialization

Since both blk_old_get_request() and blk_mq_alloc_request() initialize
rq->__data_len to zero, it is not necessary to initialize that member
in nvme_nvm_alloc_request(). Hence remove the rq->__data_len
initialization from nvme_nvm_alloc_request().
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: default avatarMatias Bjørling <mb@lightnvm.io>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 99b8dad1
...@@ -662,12 +662,10 @@ static struct request *nvme_nvm_alloc_request(struct request_queue *q, ...@@ -662,12 +662,10 @@ static struct request *nvme_nvm_alloc_request(struct request_queue *q,
rq->cmd_flags &= ~REQ_FAILFAST_DRIVER; rq->cmd_flags &= ~REQ_FAILFAST_DRIVER;
if (rqd->bio) { if (rqd->bio)
blk_init_request_from_bio(rq, rqd->bio); blk_init_request_from_bio(rq, rqd->bio);
} else { else
rq->ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); rq->ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM);
rq->__data_len = 0;
}
return rq; return rq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment