From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Miaohe Lin <linmiaohe@huawei.com>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/huge_memory: use RMAP_NONE when calling page_add_anon_rmap()
Date: Fri, 14 Jul 2023 08:58:12 +0530 [thread overview]
Message-ID: <0e685e81-ee61-a9da-1fe0-698fdc5f969a@arm.com> (raw)
In-Reply-To: <20230713120557.218592-1-linmiaohe@huawei.com>
On 7/13/23 17:35, Miaohe Lin wrote:
> It's more convenient and readable to use RMAP_NONE instead of false when
> calling page_add_anon_rmap(). No functional change intended.
It's not only more convenient, page_add_anon_rmap() also expects rmap_t
as the last argument.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> mm/huge_memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 9f3109ed7351..762be2f4244c 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -2255,7 +2255,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
> entry = pte_mksoft_dirty(entry);
> if (uffd_wp)
> entry = pte_mkuffd_wp(entry);
> - page_add_anon_rmap(page + i, vma, addr, false);
> + page_add_anon_rmap(page + i, vma, addr, RMAP_NONE);
> }
> VM_BUG_ON(!pte_none(ptep_get(pte)));
> set_pte_at(mm, addr, pte, entry);
After this change, no other page_add_anon_rmap() call site has non rmap_t
argument.
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
next prev parent reply other threads:[~2023-07-14 3:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 12:05 Miaohe Lin
2023-07-13 12:12 ` Matthew Wilcox
2023-07-14 3:28 ` Anshuman Khandual [this message]
2023-07-14 14:24 ` David Hildenbrand
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=0e685e81-ee61-a9da-1fe0-698fdc5f969a@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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