mm: close PageTail race
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / vfio / vfio_iommu_type1.c
index 6f3fbc48a6c73a2fc27d847176874ad65b68d83c..22080eb6aff658c12a821fd050f7e58df5fe84dd 100644 (file)
@@ -138,12 +138,12 @@ static bool is_invalid_reserved_pfn(unsigned long pfn)
        if (pfn_valid(pfn)) {
                bool reserved;
                struct page *tail = pfn_to_page(pfn);
-               struct page *head = compound_trans_head(tail);
+               struct page *head = compound_head(tail);
                reserved = !!(PageReserved(head));
                if (head != tail) {
                        /*
                         * "head" is not a dangling pointer
-                        * (compound_trans_head takes care of that)
+                        * (compound_head takes care of that)
                         * but the hugepage may have been split
                         * from under us (and we may not hold a
                         * reference count on the head page so it can