From: David Hildenbrand <david@redhat.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: remove unneeded PageAnon check in restore_exclusive_pte()
Date: Mon, 18 Jul 2022 15:03:05 +0200 [thread overview]
Message-ID: <0c67010a-7d5f-567c-a300-0c75f1c47cb9@redhat.com> (raw)
In-Reply-To: <20220716081816.10752-1-linmiaohe@huawei.com>
On 16.07.22 10:18, Miaohe Lin wrote:
> When code reaches here, the page must be !PageAnon. There's no need to
> check PageAnon again. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> mm/memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index f671b2dce1fe..d98f89cee3e9 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -753,7 +753,7 @@ static void restore_exclusive_pte(struct vm_area_struct *vma,
> * Currently device exclusive access only supports anonymous
> * memory so the entry shouldn't point to a filebacked page.
> */
> - WARN_ON_ONCE(!PageAnon(page));
> + WARN_ON_ONCE(1);
>
> set_pte_at(vma->vm_mm, address, ptep, pte);
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2022-07-18 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-16 8:18 Miaohe Lin
2022-07-18 13:03 ` David Hildenbrand [this message]
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=0c67010a-7d5f-567c-a300-0c75f1c47cb9@redhat.com \
--to=david@redhat.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