]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: support page_mapcount() on page_has_type() pages
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 21 Mar 2024 14:24:42 +0000 (14:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:43 +0000 (16:32 +0200)
commit92abee9c420182b33b6741ecb77e56b85901c69e
tree2639e2759d310fdc726cc97567d702f9a61d6a85
parent1eb691e806e7be10b4f58575ab91f1481ee836a1
mm: support page_mapcount() on page_has_type() pages

commit fd1a745ce03e37945674c14833870a9af0882e2d upstream.

Return 0 for pages which can't be mapped.  This matches how page_mapped()
works.  It is more convenient for users to not have to filter out these
pages.

Link: https://lkml.kernel.org/r/20240321142448.1645400-5-willy@infradead.org
Fixes: 9c5ccf2db04b ("mm: remove HUGETLB_PAGE_DTOR")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/page.c
include/linux/mm.h
include/linux/page-flags.h