Skip to content

Commit 8318a34

Browse files
committed
smb: server: make use of rdma_destroy_qp()
Signed-off-by: Namjae Jeon <[email protected]>
1 parent d21a8f3 commit 8318a34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

transport_rdma.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ static void free_transport(struct smb_direct_transport *t)
432432
if (t->qp) {
433433
ib_drain_qp(t->qp);
434434
ib_mr_pool_destroy(t->qp, &t->qp->rdma_mrs);
435-
ib_destroy_qp(t->qp);
435+
t->qp = NULL;
436+
rdma_destroy_qp(t->cm_id);
436437
}
437438

438439
ksmbd_debug(RDMA, "drain the reassembly queue\n");
@@ -1944,8 +1945,8 @@ static int smb_direct_create_qpair(struct smb_direct_transport *t,
19441945
return 0;
19451946
err:
19461947
if (t->qp) {
1947-
ib_destroy_qp(t->qp);
19481948
t->qp = NULL;
1949+
rdma_destroy_qp(t->cm_id);
19491950
}
19501951
if (t->recv_cq) {
19511952
ib_destroy_cq(t->recv_cq);

0 commit comments

Comments
 (0)