]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - mm/hugetlb.c
Fix NUMA Memory Policy Reference Counting
[linux-2.6.git] / mm / hugetlb.c
index de4cf458d6e1979432aad46613d0816146347fc1..84c795ee2d650f807223c3f17a072c3f2eb52c72 100644 (file)
@@ -71,8 +71,9 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
 {
        int nid;
        struct page *page = NULL;
+       struct mempolicy *mpol;
        struct zonelist *zonelist = huge_zonelist(vma, address,
-                                               htlb_alloc_mask);
+                                       htlb_alloc_mask, &mpol);
        struct zone **z;
 
        for (z = zonelist->zones; *z; z++) {
@@ -87,6 +88,7 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
                        break;
                }
        }
+       mpol_free(mpol);        /* unref if mpol !NULL */
        return page;
 }