* [merged mm-stable] mm-mincore-refactor-mincore_page.patch removed from -mm tree
@ 2026-08-07 2:01 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-07 2:01 UTC (permalink / raw)
To: mm-commits, ziy, vbabka, pfalcato, ljs, liam, jannh, david,
wangkefeng.wang, akpm
The quilt patch titled
Subject: mm: mincore: refactor mincore_page()
has been removed from the -mm tree. Its filename was
mm-mincore-refactor-mincore_page.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: mm: mincore: refactor mincore_page()
Date: Fri, 17 Jul 2026 17:13:47 +0800
Use early returns to reduce indentation and improve readability.
Link: https://lore.kernel.org/20260717091347.1144789-7-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mincore.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
--- a/mm/mincore.c~mm-mincore-refactor-mincore_page
+++ a/mm/mincore.c
@@ -93,7 +93,7 @@ static unsigned char mincore_swap(swp_en
*/
static unsigned char mincore_page(struct address_space *mapping, pgoff_t index)
{
- unsigned char present = 0;
+ unsigned char present;
struct folio *folio;
/*
@@ -103,17 +103,16 @@ static unsigned char mincore_page(struct
* tmpfs's .fault). So swapped out tmpfs mappings are tested here.
*/
folio = filemap_get_entry(mapping, index);
- if (folio) {
- if (xa_is_value(folio)) {
- if (shmem_mapping(mapping))
- return mincore_swap(radix_to_swp_entry(folio),
- true);
- else
- return 0;
- }
- present = folio_test_uptodate(folio);
- folio_put(folio);
+ if (!folio)
+ return 0;
+
+ if (xa_is_value(folio)) {
+ if (!shmem_mapping(mapping))
+ return 0;
+ return mincore_swap(radix_to_swp_entry(folio), true);
}
+ present = folio_test_uptodate(folio);
+ folio_put(folio);
return present;
}
_
Patches currently in -mm which might be from wangkefeng.wang@huawei.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-07 2:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 2:01 [merged mm-stable] mm-mincore-refactor-mincore_page.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.