From: Wei Yang <richard.weiyang@gmail.com>
To: akpm@linux-foundation.org, Liam.Howlett@oracle.com,
lorenzo.stoakes@oracle.com, vbabka@suse.cz, jannh@google.com
Cc: linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com>,
"Liam R . Howlett" <Liam.Howlett@Oracle.com>
Subject: [PATCH] mm/vma: next is already retrieved
Date: Wed, 27 Nov 2024 11:43:02 +0000 [thread overview]
Message-ID: <20241127114302.9650-1-richard.weiyang@gmail.com> (raw)
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@gmail.com>
CC: Liam R. Howlett <Liam.Howlett@Oracle.com>
CC: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
CC: Vlastimil Babka <vbabka@suse.cz>
CC: Jann Horn <jannh@google.com>
---
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
next reply other threads:[~2024-11-27 11:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 11:43 Wei Yang [this message]
2024-11-27 12:21 ` Lorenzo Stoakes
2024-11-28 1:10 ` Wei Yang
2024-11-28 15:48 ` Lorenzo Stoakes
2025-01-22 9:49 ` Wei Yang
2025-01-22 16:15 ` Lorenzo Stoakes
2025-01-23 1:47 ` Wei Yang
2025-01-23 11:18 ` Lorenzo Stoakes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241127114302.9650-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox