Skip to content

Commit c54849d

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
cifs: fix soft mounts hanging in the reconnect code
RHBZ: 1795429 In recent DFS updates we have a new variable controlling how many times we will retry to reconnect the share. If DFS is not used, then this variable is initialized to 0 in: static inline int dfs_cache_get_nr_tgts(const struct dfs_cache_tgt_list *tl) { return tl ? tl->tl_numtgts : 0; } This means that in the reconnect loop in smb2_reconnect() we will immediately wrap retries to -1 and never actually get to pass this conditional: if (--retries) continue; The effect is that we no longer reach the point where we fail the commands with -EHOSTDOWN and basically the kernel threads are virtually hung and unkillable. Fixes: a3a53b7 (cifs: Add support for failover in smb2_reconnect()) Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> CC: Stable <[email protected]>
1 parent 6835398 commit c54849d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)
312312
if (server->tcpStatus != CifsNeedReconnect)
313313
break;
314314

315-
if (--retries)
315+
if (retries && --retries)
316316
continue;
317317

318318
/*

0 commit comments

Comments
 (0)