The patch titled Subject: Xarray: distinguish large entries correctly in xas_split_alloc() has been added to the -mm mm-nonmm-unstable branch. Its filename is xarray-distinguish-large-entries-correctly-in-xas_split_alloc.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/xarray-distinguish-large-entries-correctly-in-xas_split_alloc.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> Subject: Xarray: distinguish large entries correctly in xas_split_alloc() Date: Fri, 13 Dec 2024 20:25:21 +0800 We don't support large entries which expand two more level xa_node in split. For case "xas->xa_shift + 2 * XA_CHUNK_SHIFT == order", we also need two level of xa_node to expand. Distinguish entry as large entry in case "xas->xa_shift + 2 * XA_CHUNK_SHIFT == order". As max order of folio in pagecache (MAX_PAGECACHE_ORDER) is <= (XA_CHUNK_SHIFT * 2 - 1), this change is more likely a cleanup... Link: https://lkml.kernel.org/r/20241213122523.12764-4-shikemeng@xxxxxxxxxxxxxxx Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/xarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/xarray.c~xarray-distinguish-large-entries-correctly-in-xas_split_alloc +++ a/lib/xarray.c @@ -1027,7 +1027,7 @@ void xas_split_alloc(struct xa_state *xa unsigned int mask = xas->xa_sibs; /* XXX: no support for splitting really large entries yet */ - if (WARN_ON(xas->xa_shift + 2 * XA_CHUNK_SHIFT < order)) + if (WARN_ON(xas->xa_shift + 2 * XA_CHUNK_SHIFT <= order)) goto nomem; if (xas->xa_shift + XA_CHUNK_SHIFT > order) return; _ Patches currently in -mm which might be from shikemeng@xxxxxxxxxxxxxxx are xarray-do-not-return-sibling-entries-from-xas_find_marked.patch xarray-move-forward-index-correctly-in-xas_pause.patch xarray-distinguish-large-entries-correctly-in-xas_split_alloc.patch xarray-remove-repeat-check-in-xas_squash_marks.patch xarray-use-xa_mark_t-in-xas_squash_marks-to-keep-code-consistent.patch