mm: introdule compound_head_by_tail()
[firefly-linux-kernel-4.4.55.git] / mm / swap.c
index d089c5a0cf9831bb6dca8489e15e56acc6a0a66a..c8d6df556ce64600467ed92f8dbbb1b1639e4e28 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -253,7 +253,7 @@ static void put_compound_page(struct page *page)
         *  Case 3 is possible, as we may race with
         *  __split_huge_page_refcount tearing down a THP page.
         */
-       page_head = compound_head(page);
+       page_head = compound_head_by_tail(page);
        if (!__compound_tail_refcounted(page_head))
                put_unrefcounted_compound_page(page_head, page);
        else