diff --git a/[refs] b/[refs] index 902bae007af9..488913da6b5e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: de34d965a80d0f61a354bdefa0b15a88bcff2028 +refs/heads/master: 97d255c816946388bab504122937730d3447c612 diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index 18747528eec3..bb790f5919e3 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -5500,11 +5500,18 @@ __count_immobile_pages(struct zone *zone, struct page *page, int count) continue; page = pfn_to_page(check); - if (!page_count(page)) { + /* + * We can't use page_count without pin a page + * because another CPU can free compound page. + * This check already skips compound tails of THP + * because their page->_count is zero at all time. + */ + if (!atomic_read(&page->_count)) { if (PageBuddy(page)) iter += (1 << page_order(page)) - 1; continue; } + if (!PageLRU(page)) found++; /*