]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvme: make nvme_identify_ns propagate errors back
authorSagi Grimberg <sagi@grimberg.me>
Sat, 3 Aug 2019 01:11:42 +0000 (18:11 -0700)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 12 Sep 2019 15:50:45 +0000 (08:50 -0700)
commit331813f687ed41347b2b7dc784d81ccdbf6f9157
tree6967b4f059054186ceb29d35fed216cc3a3a644b
parent2f9c173647753b81eed7c198abf7622ab22dc49d
nvme: make nvme_identify_ns propagate errors back

right now callers of nvme_identify_ns only know that it failed,
but don't know why. Make nvme_identify_ns propagate the error back.
Because nvme_submit_sync_cmd may return a positive status code, we
make nvme_identify_ns receive the id by reference and return that
status up the call chain, but make sure not to leak positive nvme
status codes to the upper layers.

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c