Skip to content

Commit 0353782

Browse files
metze-sambasmfrench
authored andcommitted
smb: client: return an error if rdma_connect does not return within 5 seconds
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>
1 parent bef82d5 commit 0353782

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
@@ -1653,8 +1653,10 @@ static struct smbd_connection *_smbd_get_connection(
16531653
goto rdma_connect_failed;
16541654
}
16551655

1656-
wait_event_interruptible(
1657-
info->conn_wait, sc->status != SMBDIRECT_SOCKET_CONNECTING);
1656+
wait_event_interruptible_timeout(
1657+
info->conn_wait,
1658+
sc->status != SMBDIRECT_SOCKET_CONNECTING,
1659+
msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT));
16581660

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

0 commit comments

Comments
 (0)