[PATCH] mm/vma: next is already retrieved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vma_iter_next_rewind() here gets next vma and rewind iterator.

Actually the next vma is already been retrieved to new_vma. Since the
iterator is initialized to addr, we don't need to adjust it.

Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
CC: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
CC: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
CC: Vlastimil Babka <vbabka@xxxxxxx>
CC: Jann Horn <jannh@xxxxxxxxxx>
---
 mm/vma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vma.c b/mm/vma.c
index 8a454a7bbc80..d419e3700fa7 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -1727,7 +1727,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
 
 	vmg.vma = NULL; /* New VMA range. */
 	vmg.pgoff = pgoff;
-	vmg.next = vma_iter_next_rewind(&vmi, NULL);
+	vmg.next = new_vma;
 	new_vma = vma_merge_new_range(&vmg);
 
 	if (new_vma) {
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux