]> www.infradead.org Git - users/jedix/linux-maple.git/commit
smb: client: don't retry IO on failed negprotos with soft mounts
authorPaulo Alcantara <pc@manguebit.com>
Mon, 17 Mar 2025 19:39:22 +0000 (16:39 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 17 Mar 2025 22:33:13 +0000 (17:33 -0500)
commit7643dbd9db09fffebb4a62cd27599f17f4148b17
tree53a3acc29d35d2ca5692fcf1723872660f27d0d4
parent4701f33a10702d5fc577c32434eb62adde0a1ae1
smb: client: don't retry IO on failed negprotos with soft mounts

If @server->tcpStatus is set to CifsNeedReconnect after acquiring
@ses->session_mutex in smb2_reconnect() or cifs_reconnect_tcon(), it
means that a concurrent thread failed to negotiate, in which case the
server is no longer responding to any SMB requests, so there is no
point making the caller retry the IO by returning -EAGAIN.

Fix this by returning -EHOSTDOWN to the callers on soft mounts.

Cc: David Howells <dhowells@redhat.com>
Reported-by: Jay Shin <jaeshin@redhat.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifssmb.c
fs/smb/client/smb2pdu.c