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 <[email protected]> Cc: Tom Talpey <[email protected]> Cc: Long Li <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: f198186 ("CIFS: SMBD: Establish SMB Direct connection") Signed-off-by: Stefan Metzmacher <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent bef82d5 commit 0353782

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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)