still fails for ACCESS_DENIED from the server for large writes gmac-signing-access-denied
authorSteve French <stfrench@microsoft.com>
Wed, 14 Sep 2022 08:06:31 +0000 (03:06 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 14 Sep 2022 08:06:31 +0000 (03:06 -0500)
fs/cifs/smb2transport.c

index 0dba2bcee3f7264d971b728204de70f5c23800ff..4b912c75caa32d8f66a21286c5c28b982ea8efa1 100644 (file)
@@ -709,6 +709,13 @@ static struct scatterlist *init_sg_gmac(int num_rqst, struct smb_rqst *rqst, u8
                                        rqst[i].rq_iov[j].iov_len);
                }
 
+               for (j = 0; j < rqst[i].rq_npages; j++) {
+                       unsigned int len, offset;
+
+                       rqst_page_get_length(&rqst[i], j, &len, &offset);
+                       sg_set_page(&sg[idx++], rqst[i].rq_pages[j], len, offset);
+               }
+#if 0
                for (j = 0; j < rqst[i].rq_npages; j++) {
                        unsigned int len, offset;
                        void *kaddr = NULL;
@@ -724,6 +731,7 @@ static struct scatterlist *init_sg_gmac(int num_rqst, struct smb_rqst *rqst, u8
 
                        kunmap(rqst->rq_pages[i]);
                }
+#endif
        }
 
        /* initialize signature buffer */