]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/cifs/smb2transport.c
enable fallocate punch hole ("fallocate -p") for SMB3
[karo-tx-linux.git] / fs / cifs / smb2transport.c
index 59c748ce872f9bb190bf683c8fd49a38926e3b4d..5111e7272db62e718fcb3d968af48083d598bccf 100644 (file)
@@ -466,7 +466,12 @@ smb2_verify_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server)
 static inline void
 smb2_seq_num_into_buf(struct TCP_Server_Info *server, struct smb2_hdr *hdr)
 {
+       unsigned int i, num = le16_to_cpu(hdr->CreditCharge);
+
        hdr->MessageId = get_next_mid64(server);
+       /* skip message numbers according to CreditCharge field */
+       for (i = 1; i < num; i++)
+               get_next_mid(server);
 }
 
 static struct mid_q_entry *