From: David Hildenbrand <david@redhat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
Pedro Falcato <pfalcato@suse.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vma: refactor vma_modify_flags_name() to vma_modify_name()
Date: Mon, 14 Jul 2025 16:18:13 +0200 [thread overview]
Message-ID: <ee19189f-7510-4ddd-85b0-34d6319f8fc6@redhat.com> (raw)
In-Reply-To: <20250714135839.178032-1-lorenzo.stoakes@oracle.com>
On 14.07.25 15:58, Lorenzo Stoakes wrote:
> The single instance in which we use this function doesn't actually need to
> change VMA flags, so remove this parameter and update the caller
> accordingly.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> mm/madvise.c | 4 ++--
> mm/vma.c | 4 +---
> mm/vma.h | 15 +++++++--------
> 3 files changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/mm/madvise.c b/mm/madvise.c
> index 9de9b7c797c6..afa9e4db2adb 100644
> --- a/mm/madvise.c
> +++ b/mm/madvise.c
> @@ -162,8 +162,8 @@ static int madvise_update_vma(vm_flags_t new_flags,
> return 0;
>
> if (set_new_anon_name)
> - vma = vma_modify_flags_name(&vmi, madv_behavior->prev, vma,
> - range->start, range->end, new_flags, anon_name);
> + vma = vma_modify_name(&vmi, madv_behavior->prev, vma,
> + range->start, range->end, anon_name);
> else
The doc of madvise_update_vma() is a bit misleading:
"Update the vm_flags and/or anon_name"
I assume it's xor? Do we want to sanity check that this will hold true?
In general, LGTM.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-07-14 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 13:58 [PATCH] mm/vma: refactor vma_modify_flags_name() to vma_modify_name() Lorenzo Stoakes
2025-07-14 14:15 ` Vlastimil Babka
2025-07-14 14:18 ` David Hildenbrand [this message]
2025-07-14 14:24 ` Lorenzo Stoakes
2025-07-14 14:27 ` David Hildenbrand
2025-07-14 14:31 ` Lorenzo Stoakes
2025-07-14 14:43 ` Liam R. Howlett
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=ee19189f-7510-4ddd-85b0-34d6319f8fc6@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=pfalcato@suse.de \
--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;
as well as URLs for NNTP newsgroup(s).