mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
mm: remove redundant test in validate_page_before_insert()
The page_has_type() call would have included slab since commit46df8e73a4and now we don't even get that far because slab pages have a zero refcount since commit9aec2fb0fd. Link: https://lkml.kernel.org/r/20250910142923.2465470-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: David Hildenbrand <david@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
3a37469e5a
commit
6fd893a40e
@@ -2266,8 +2266,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;
|
||||
|
||||
Reference in New Issue
Block a user