Skip to content

Commit f95904e

Browse files
metze-sambagregkh
authored andcommitted
smb: client: return an error if rdma_connect does not return within 5 seconds
[ Upstream commit 0353782 ] This matches the timeout for tcp connections. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Fixes: f198186 ("CIFS: SMBD: Establish SMB Direct connection") Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f32eb1f commit f95904e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

fs/smb/client/smbdirect.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,10 @@ static struct smbd_connection *_smbd_get_connection(
16341634
goto rdma_connect_failed;
16351635
}
16361636

1637-
wait_event_interruptible(
1638-
info->conn_wait, sc->status != SMBDIRECT_SOCKET_CONNECTING);
1637+
wait_event_interruptible_timeout(
1638+
info->conn_wait,
1639+
sc->status != SMBDIRECT_SOCKET_CONNECTING,
1640+
msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT));
16391641

16401642
if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
16411643
log_rdma_event(ERR, "rdma_connect failed port=%d\n", port);

0 commit comments

Comments
 (0)