nvme: refactor nvme_submit_user_cmd()
authorChristoph Hellwig <hch@lst.de>
Wed, 11 May 2022 05:47:47 +0000 (11:17 +0530)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 May 2022 13:41:05 +0000 (07:41 -0600)
commitbcad2565b5d64700cf68cc9d48618ab817ff5bc4
treed443be29af0cb1fd767dd2b450b5c3411eaf33b4
parent1c2d2fff6dc04662dc8e86b537989643e1abeed9
nvme: refactor nvme_submit_user_cmd()

Divide the work into two helpers, namely nvme_alloc_user_request and
nvme_execute_user_rq. This is a prep patch, to help wiring up
uring-cmd support in nvme.

Signed-off-by: Christoph Hellwig <hch@lst.de>
[axboe: fold in fix for assuming bio is non-NULL]
Link: https://lore.kernel.org/r/20220511054750.20432-4-joshi.k@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/ioctl.c