Skip to content

Commit 859d615

Browse files
germanopgregkh
authored andcommitted
CIFS: remove bad_network_name flag
commit a0918f1ce6a43ac980b42b300ec443c154970979 upstream. STATUS_BAD_NETWORK_NAME can be received during node failover, causing the flag to be set and making the reconnect thread always unsuccessful, thereafter. Once the only place where it is set is removed, the remaining bits are rendered moot. Removing it does not prevent "mount" from failing when a non existent share is passed. What happens when the share really ceases to exist while the share is mounted is undefined now as much as it was before. Signed-off-by: Germano Percossi <germano.percossi@citrix.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f8fe51c commit 859d615

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

fs/cifs/cifsglob.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,6 @@ struct cifs_tcon {
906906
bool use_persistent:1; /* use persistent instead of durable handles */
907907
#ifdef CONFIG_CIFS_SMB2
908908
bool print:1; /* set if connection to printer share */
909-
bool bad_network_name:1; /* set if ret status STATUS_BAD_NETWORK_NAME */
910909
__le32 capabilities;
911910
__u32 share_flags;
912911
__u32 maximal_access;

fs/cifs/smb2pdu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,9 +932,6 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
932932
else
933933
return -EIO;
934934

935-
if (tcon && tcon->bad_network_name)
936-
return -ENOENT;
937-
938935
if ((tcon && tcon->seal) &&
939936
((ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION) == 0)) {
940937
cifs_dbg(VFS, "encryption requested but no server support");
@@ -1036,8 +1033,6 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
10361033
tcon_error_exit:
10371034
if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) {
10381035
cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
1039-
if (tcon)
1040-
tcon->bad_network_name = true;
10411036
}
10421037
goto tcon_exit;
10431038
}

0 commit comments

Comments
 (0)