Skip to content

Commit 141fa98

Browse files
namjaejeonsmfrench
authored andcommitted
ksmbd: call ib_drain_qp when disconnected
When disconnected, call ib_drain_qp to cancel all pending work requests and prevent ksmbd_conn_handler_loop from waiting for a long time for those work requests to compelete. Signed-off-by: Hyunchul Lee <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Reviewed-by: Tom Talpey <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent dbab80e commit 141fa98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/ksmbd/transport_rdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ static int smb_direct_cm_handler(struct rdma_cm_id *cm_id,
15271527
}
15281528
case RDMA_CM_EVENT_DEVICE_REMOVAL:
15291529
case RDMA_CM_EVENT_DISCONNECTED: {
1530+
ib_drain_qp(t->qp);
1531+
15301532
t->status = SMB_DIRECT_CS_DISCONNECTED;
15311533
wake_up_interruptible(&t->wait_status);
15321534
wake_up_interruptible(&t->wait_reassembly_queue);

0 commit comments

Comments
 (0)