Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

smb: smbdirect: wrap rdma_disconnect() in rdma_[un]lock_handler()

This might not be needed, but it controls the order
of ib_drain_qp() and rdma_disconnect().

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Stefan Metzmacher and committed by
Steve French
a40e6f01 33b2894e

+13
+13
fs/smb/common/smbdirect/smbdirect_socket.c
··· 474 474 case SMBDIRECT_SOCKET_CONNECTED: 475 475 case SMBDIRECT_SOCKET_ERROR: 476 476 sc->status = SMBDIRECT_SOCKET_DISCONNECTING; 477 + /* 478 + * Make sure we hold the callback lock 479 + * im order to coordinate with the 480 + * rdma_event handlers, typically 481 + * smbdirect_connection_rdma_event_handler(), 482 + * and smbdirect_socket_destroy(). 483 + * 484 + * So that the order of ib_drain_qp() 485 + * and rdma_disconnect() is controlled 486 + * by the mutex. 487 + */ 488 + rdma_lock_handler(sc->rdma.cm_id); 477 489 rdma_disconnect(sc->rdma.cm_id); 490 + rdma_unlock_handler(sc->rdma.cm_id); 478 491 break; 479 492 480 493 case SMBDIRECT_SOCKET_CREATED: