From: Christoph Lameter Date: Tue, 5 Feb 2008 06:28:35 +0000 (-0800) Subject: VM: allow get_page_unless_zero on compound pages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aec2c3ed01ed54d0cdf7f6b7c4be217c045ac5ea;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git VM: allow get_page_unless_zero on compound pages Both slab defrag and the large blocksize patches need to ability to take refcounts on compound pages. May be useful in other places as well. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mm.h b/include/linux/mm.h index f28a0338574f..bcbe6979ff65 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -227,7 +227,7 @@ static inline int put_page_testzero(struct page *page) */ static inline int get_page_unless_zero(struct page *page) { - VM_BUG_ON(PageCompound(page)); + VM_BUG_ON(PageTail(page)); return atomic_inc_not_zero(&page->_count); }