bdev/nvme: don't check spdk_nvme_ctrlr_free_io_qpair return
spdk_nvme_ctrlr_free_io_qpair now always returns 0, so update the code to account for that. Fixes issue #2012. Signed-off-by: Jim Harris <james.r.harris@intel.com> Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I61c78459472573adbfeb28052ae3379d7880567c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8660 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
4246e79c04
commit
109af0bcb3
@ -432,20 +432,13 @@ err:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
bdev_nvme_destroy_qpair(struct nvme_io_path *io_path)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (io_path->qpair == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = spdk_nvme_ctrlr_free_io_qpair(io_path->qpair);
|
||||
if (!rc) {
|
||||
if (io_path->qpair != NULL) {
|
||||
spdk_nvme_ctrlr_free_io_qpair(io_path->qpair);
|
||||
io_path->qpair = NULL;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -621,11 +614,9 @@ _bdev_nvme_reset_destroy_qpair(struct spdk_io_channel_iter *i)
|
||||
{
|
||||
struct spdk_io_channel *ch = spdk_io_channel_iter_get_channel(i);
|
||||
struct nvme_io_path *io_path = spdk_io_channel_get_ctx(ch);
|
||||
int rc;
|
||||
|
||||
rc = bdev_nvme_destroy_qpair(io_path);
|
||||
|
||||
spdk_for_each_channel_continue(i, rc);
|
||||
bdev_nvme_destroy_qpair(io_path);
|
||||
spdk_for_each_channel_continue(i, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user