mm: memcontrol: remove BUG_ON in uncharge_list
authorLi RongQing <roy.qing.li@gmail.com>
Tue, 26 Jul 2016 22:26:53 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2016 23:19:19 +0000 (16:19 -0700)
When calling uncharge_list, if a page is transparent huge we don't need
to BUG_ON about non-transparent huge, since nobody should be able to see
the page at this stage and this page cannot be raced against with a THP
split.

This check became unneeded after 0a31bc97c80c ("mm: memcontrol: rewrite
uncharge API").

[mhocko@suse.com: changelog enhancements]
Link: http://lkml.kernel.org/r/1465369248-13865-1-git-send-email-roy.qing.li@gmail.com
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c

index 1a1a3093a5c9e8c6cb454b5234f36dd3e5c62c8f..36d6e324fadca04e19ddd97d9c8a79c9dc807e3d 100644 (file)
@@ -5580,7 +5580,6 @@ static void uncharge_list(struct list_head *page_list)
 
                        if (PageTransHuge(page)) {
                                nr_pages <<= compound_order(page);
-                               VM_BUG_ON_PAGE(!PageTransHuge(page), page);
                                nr_huge += nr_pages;
                        }
                        if (PageAnon(page))