]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/huge_memory: Use vma_next() instead of vma linked list
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 4 Jan 2021 19:56:58 +0000 (14:56 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 18 Jan 2021 15:54:57 +0000 (10:54 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/huge_memory.c

index 5aa045e3b5dc19046752f8370bde03e2763311a0..72e2ea6f696ee2fc16c3d268c7f0139e07b8c009 100644 (file)
@@ -2321,12 +2321,12 @@ void vma_adjust_trans_huge(struct vm_area_struct *vma,
                split_huge_pmd_address(vma, end, false, NULL);
 
        /*
-        * If we're also updating the vma->vm_next->vm_start, if the new
-        * vm_next->vm_start isn't hpage aligned and it could previously
+        * If we're also updating the vma_next(vma)->vm_start, if the new
+        * vma_next()->vm_start isn't hpage aligned and it could previously
         * contain an hugepage: check if we need to split an huge pmd.
         */
        if (adjust_next > 0) {
-               struct vm_area_struct *next = vma->vm_next;
+               struct vm_area_struct *next = vma_next(vma->vm_mm, vma);
                unsigned long nstart = next->vm_start;
                nstart += adjust_next;
                if (nstart & ~HPAGE_PMD_MASK &&