Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm...
[linux-2.6-microblaze.git] / fs / cifs / smb2pdu.c
index e36c2a8..9f24eb8 100644 (file)
@@ -841,6 +841,8 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
                req->SecurityMode = 0;
 
        req->Capabilities = cpu_to_le32(server->vals->req_capabilities);
+       if (ses->chan_max > 1)
+               req->Capabilities |= cpu_to_le32(SMB2_GLOBAL_CAP_MULTI_CHANNEL);
 
        /* ClientGUID must be zero for SMB2.02 dialect */
        if (server->vals->protocol_id == SMB20_PROT_ID)
@@ -1032,6 +1034,9 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
 
        pneg_inbuf->Capabilities =
                        cpu_to_le32(server->vals->req_capabilities);
+       if (tcon->ses->chan_max > 1)
+               pneg_inbuf->Capabilities |= cpu_to_le32(SMB2_GLOBAL_CAP_MULTI_CHANNEL);
+
        memcpy(pneg_inbuf->Guid, server->client_guid,
                                        SMB2_CLIENT_GUID_SIZE);
 
@@ -3895,10 +3900,10 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
                         * Related requests use info from previous read request
                         * in chain.
                         */
-                       shdr->SessionId = 0xFFFFFFFF;
+                       shdr->SessionId = 0xFFFFFFFFFFFFFFFF;
                        shdr->TreeId = 0xFFFFFFFF;
-                       req->PersistentFileId = 0xFFFFFFFF;
-                       req->VolatileFileId = 0xFFFFFFFF;
+                       req->PersistentFileId = 0xFFFFFFFFFFFFFFFF;
+                       req->VolatileFileId = 0xFFFFFFFFFFFFFFFF;
                }
        }
        if (remaining_bytes > io_parms->length)