]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/hugetlb_cgroup: remove unnecessary VM_BUG_ON_PAGE in hugetlb_cgroup_migrate()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 5 May 2021 01:33:28 +0000 (18:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:20 +0000 (11:27 -0700)
!PageHuge(oldhpage) is implicitly checked in page_hstate() above, so we
remove this explicit one.

Link: https://lkml.kernel.org/r/20210308112809.26107-4-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb_cgroup.c

index 603a131e262dc75ca4cb61f87e6751ef8368de4b..726b85f4f30382b43e54c50813c50c27b5e483d1 100644 (file)
@@ -784,7 +784,6 @@ void hugetlb_cgroup_migrate(struct page *oldhpage, struct page *newhpage)
        if (hugetlb_cgroup_disabled())
                return;
 
-       VM_BUG_ON_PAGE(!PageHuge(oldhpage), oldhpage);
        spin_lock(&hugetlb_lock);
        h_cg = hugetlb_cgroup_from_page(oldhpage);
        h_cg_rsvd = hugetlb_cgroup_from_page_rsvd(oldhpage);