smb3: do not attempt multichannel to server which does not support it
[sfrench/cifs-2.6.git] / fs / cifs / sess.c
index 63d517b9f2ffefddcc5cb01cf07f1c2b2df68826..a92a1fb7cb526a25227590514b039fa5527bd4ee 100644 (file)
@@ -97,6 +97,12 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
                return 0;
        }
 
+       if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
+               cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
+               ses->chan_max = 1;
+               return 0;
+       }
+
        /*
         * Make a copy of the iface list at the time and use that
         * instead so as to not hold the iface spinlock for opening