From 2d14d718253d321f06f27cea681a7edee8492fe5 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Mon, 4 May 2020 15:03:38 -0700 Subject: [PATCH] LU-12904 o2ib: ib_destroy_cq() returns void Kernel destroy CQ flows can't fail and the returned value of ib_destroy_cq() is not interested in those flows. kernel-commit: 890ac8d97e6722a9e4a66a0bd836d1b028d075fe This patch is back-ported from the following one: Lustre-commit: 7d2ea1e5bbd80f23e6935174c969b34b58048443 Lustre-change: https://review.whamcloud.com/36578 Test-Parameters: trivial Cray-bug-id: LUS-8042 Signed-off-by: Shaun Tancheff Change-Id: I873bf76a33bd80d5e6de4d1b16a79ff5ea930f3a Reviewed-on: https://review.whamcloud.com/38489 Reviewed-by: Yang Sheng Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/klnds/o2iblnd/o2iblnd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c index 64f6eef..efcb58b 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.c +++ b/lnet/klnds/o2iblnd/o2iblnd.c @@ -1008,8 +1008,7 @@ void kiblnd_destroy_conn(struct kib_conn *conn) { struct rdma_cm_id *cmid = conn->ibc_cmid; - struct kib_peer_ni *peer_ni = conn->ibc_peer; - int rc; + struct kib_peer_ni *peer_ni = conn->ibc_peer; LASSERT (!in_interrupt()); LASSERT (atomic_read(&conn->ibc_refcount) == 0); @@ -1040,11 +1039,8 @@ kiblnd_destroy_conn(struct kib_conn *conn) if (cmid != NULL && cmid->qp != NULL) rdma_destroy_qp(cmid); - if (conn->ibc_cq != NULL) { - rc = ib_destroy_cq(conn->ibc_cq); - if (rc != 0) - CWARN("Error destroying CQ: %d\n", rc); - } + if (conn->ibc_cq) + ib_destroy_cq(conn->ibc_cq); kiblnd_txlist_done(&conn->ibc_zombie_txs, -ECONNABORTED, LNET_MSG_STATUS_OK); -- 1.8.3.1