@@ -1392,6 +1392,22 @@ static void idle_connection_timer(struct work_struct *work)
info->keep_alive_interval*HZ);
}
+/* Destroy this SMBD connection, called from upper layer */
+void smbd_destroy(struct smbd_connection *info)
+{
+ log_rdma_event(INFO, "destroying rdma session\n");
+
+ /* Kick off the disconnection process */
+ smbd_disconnect_rdma_connection(info);
+
+ log_rdma_event(INFO, "wait for transport being destroyed\n");
+ wait_event(info->wait_destroy,
+ info->transport_status == SMBD_DESTROYED);
+
+ destroy_workqueue(info->workqueue);
+ kfree(info);
+}
+
/*
* Reconnect this SMBD connection, called from upper layer
* return value: 0 on success, or actual error code