From: Vlastimil Babka <vbabka@suse.cz>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH 2/3] mm: Remove redundant test in validate_page_before_insert()
Date: Wed, 10 Sep 2025 16:42:56 +0200 [thread overview]
Message-ID: <36965cf1-d35c-4634-a6fb-09cd2a81f914@suse.cz> (raw)
In-Reply-To: <20250910142923.2465470-3-willy@infradead.org>
On 9/10/25 16:29, Matthew Wilcox (Oracle) wrote:
> The page_has_type() call would have included slab since commit
> 46df8e73a4a3 and now we don't even get that far because slab
> pages have a zero refcount since commit 9aec2fb0fd5e.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/memory.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 3e0404bd57a0..46fa459d9a11 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -2268,8 +2268,7 @@ static int validate_page_before_insert(struct vm_area_struct *vma,
> return -EINVAL;
> return 0;
> }
> - if (folio_test_anon(folio) || folio_test_slab(folio) ||
> - page_has_type(page))
> + if (folio_test_anon(folio) || page_has_type(page))
> return -EINVAL;
> flush_dcache_folio(folio);
> return 0;
next prev parent reply other threads:[~2025-09-10 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 14:29 [PATCH 0/3] Small cleanups Matthew Wilcox (Oracle)
2025-09-10 14:29 ` [PATCH 1/3] mm: Constify compound_order() and page_size() Matthew Wilcox (Oracle)
2025-09-10 14:42 ` Vlastimil Babka
2025-09-10 14:29 ` [PATCH 2/3] mm: Remove redundant test in validate_page_before_insert() Matthew Wilcox (Oracle)
2025-09-10 14:42 ` Vlastimil Babka [this message]
2025-09-10 14:29 ` [PATCH 3/3] mm: Remove page->order Matthew Wilcox (Oracle)
2025-09-10 14:50 ` Vlastimil Babka
2025-09-10 20:03 ` Alexei Starovoitov
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=36965cf1-d35c-4634-a6fb-09cd2a81f914@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.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