]> www.infradead.org Git - users/willy/linux.git/commit
mm/page_owner: align with pageblock_nr_pages
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 5 Dec 2018 00:14:04 +0000 (11:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Dec 2018 22:08:53 +0000 (09:08 +1100)
commit7ee1a5c01b845f3d26893f313cf7b835db61d1b7
treebf33d8b1532012eb0f99ba9c777c68712d571af9
parentb4feec31fff96fadcf207e4c9e00c301971a2bed
mm/page_owner: align with pageblock_nr_pages

Currently, init_pages_in_zone() walks the zone in pageblock_nr_pages
steps.  MAX_ORDER_NR_PAGES is possible to have holes when
CONFIG_HOLES_IN_ZONE is set.  it is likely to be different between
MAX_ORDER_NR_PAGES and pageblock_nr_pages.  if we skip the size of
MAX_ORDER_NR_PAGES, it will result in the second 2M memroy leak.

Meanwhile, the change will make the code consistent.  because the entire
function is based on the pageblock_nr_pages steps.

Link: http://lkml.kernel.org/r/1512395284-13588-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/page_owner.c