]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cifs/smb2pdu.c
Fix warning messages when mounting to older servers
[karo-tx-linux.git] / fs / cifs / smb2pdu.c
index 97edb4d376cd40e1e6044ed6b5ff7072e0d1b10c..7aa67206f6da2fe3e8ed4c1913a561948614db0a 100644 (file)
@@ -514,7 +514,12 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
         * No tcon so can't do
         * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]);
         */
-       if (rc != 0)
+       if (rc == -EOPNOTSUPP) {
+               cifs_dbg(VFS, "Dialect not supported by server. Consider "
+                       "specifying vers=1.0 or vers=2.1 on mount for accessing"
+                       " older servers\n");
+               goto neg_exit;
+       } else if (rc != 0)
                goto neg_exit;
 
        cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode);