Skip to content

Commit dd6940f

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: let free_transport() wait for SMBDIRECT_SOCKET_DISCONNECTED
We should wait for the rdma_cm to become SMBDIRECT_SOCKET_DISCONNECTED! At least on the client side (with similar code) wait_event_interruptible() often returns with -ERESTARTSYS instead of waiting for SMBDIRECT_SOCKET_DISCONNECTED. We should use wait_event() here too, which makes the code be identical in client and server, which will help when moving to common functions. Fixes: b316060 ("smb: server: move smb_direct_disconnect_rdma_work() into free_transport()") Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> 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>
1 parent 123111e commit dd6940f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/smb/server/transport_rdma.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,10 @@ static void free_transport(struct smb_direct_transport *t)
451451
struct smbdirect_recv_io *recvmsg;
452452

453453
disable_work_sync(&sc->disconnect_work);
454-
if (sc->status < SMBDIRECT_SOCKET_DISCONNECTING) {
454+
if (sc->status < SMBDIRECT_SOCKET_DISCONNECTING)
455455
smb_direct_disconnect_rdma_work(&sc->disconnect_work);
456-
wait_event_interruptible(sc->status_wait,
457-
sc->status == SMBDIRECT_SOCKET_DISCONNECTED);
458-
}
456+
if (sc->status < SMBDIRECT_SOCKET_DISCONNECTED)
457+
wait_event(sc->status_wait, sc->status == SMBDIRECT_SOCKET_DISCONNECTED);
459458

460459
/*
461460
* Wake up all waiters in all wait queues

0 commit comments

Comments
 (0)