lightnvm: create cmd before allocating request
authorJavier González <[email protected]>
Wed, 3 May 2017 09:19:04 +0000 (11:19 +0200)
committerJens Axboe <[email protected]>
Thu, 4 May 2017 13:53:04 +0000 (07:53 -0600)
commit2e13f33a2464fc3aa7783022a90309cabeca8935
treedb025603a0572b86538f0e15a1d131cfb5d8e268
parent2719aa217e0d025dbfce74ac777815776ccec072
lightnvm: create cmd before allocating request

Create nvme command before allocating a request using
nvme_alloc_request, which uses the command direction. Up until now, the
command has been zeroized, so all commands have been allocated as a
read operation.

Signed-off-by: Javier González <[email protected]>
Reviewed-by: Matias Bjørling <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/nvme/host/lightnvm.c