]> git.baikalelectronics.ru Git - kernel.git/commit
mm: hugetlb: fix missing put_page in gather_surplus_pages()
authorMuchun Song <songmuchun@bytedance.com>
Fri, 5 Feb 2021 02:33:00 +0000 (18:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Feb 2021 19:03:47 +0000 (11:03 -0800)
commit2b80cc783c39c9b7e28b8a880c8cc152682a6e04
treebbbfe14fbd8bcf9624aa216393eaf75411caeda6
parent2f853e1325b3afc6e6f78214c4893509532a0c26
mm: hugetlb: fix missing put_page in gather_surplus_pages()

The VM_BUG_ON_PAGE avoids the generation of any code, even if that
expression has side-effects when !CONFIG_DEBUG_VM.

Link: https://lkml.kernel.org/r/20210126031009.96266-1-songmuchun@bytedance.com
Fixes: 79683eb0451b ("mm/hugetlb.c: just use put_page_testzero() instead of page_count()")
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c