nvmet: avoid double errno conversions
authorChristoph Hellwig <hch@lst.de>
Tue, 12 Mar 2019 17:05:10 +0000 (18:05 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 5 Apr 2019 06:07:56 +0000 (08:07 +0200)
commitcfe03c2ec46200dfefa5167e6a2bb50c0426c5f4
tree92cac7d8c250bf1301e6a0e50a72746275d2e37a
parent43e2d08d0790a09ee1d2c838e33343ee1bcaf610
nvmet: avoid double errno conversions

Use errno_to_nvme_status to convert from a negative errno to a
nvme status field instead of going through a blk_status_t.

Also remove the pointless status variable in
nvmet_bdev_execute_write_zeroes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
drivers/nvme/target/io-cmd-bdev.c