The patch titled Subject: cachestat: implement cachestat syscall (fix) has been added to the -mm mm-unstable branch. Its filename is cachestat-implement-cachestat-syscall-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/cachestat-implement-cachestat-syscall-fix.patch This patch will later appear in the mm-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: Nhat Pham <nphamcs@xxxxxxxxx> Subject: cachestat: implement cachestat syscall (fix) Date: Wed, 3 May 2023 19:20:44 -0700 This fixlet replaces rounddown logic with the existing helper. Link: https://lkml.kernel.org/r/20230504022044.3675469-1-nphamcs@xxxxxxxxx Fixes: 5c289a59b1d0 ("cachestat: implement cachestat syscall") Signed-off-by: Nhat Pham <nphamcs@xxxxxxxxx> Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/filemap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/filemap.c~cachestat-implement-cachestat-syscall-fix +++ a/mm/filemap.c @@ -4157,8 +4157,7 @@ static void filemap_cachestat(struct add int order = xa_get_order(xas.xa, xas.xa_index); nr_pages = 1 << order; - /* rounds down to the nearest multiple of 2^order */ - folio_first_index = xas.xa_index >> order << order; + folio_first_index = round_down(xas.xa_index, 1 << order); folio_last_index = folio_first_index + nr_pages - 1; /* Folios might straddle the range boundaries, only count covered pages */ _ Patches currently in -mm which might be from nphamcs@xxxxxxxxx are zsmalloc-move-lru-update-from-zs_map_object-to-zs_malloc.patch workingset-refactor-lru-refault-to-expose-refault-recency-check.patch cachestat-implement-cachestat-syscall.patch cachestat-implement-cachestat-syscall-fix.patch selftests-add-selftests-for-cachestat.patch