mm/page_alloc: Correct return value of populated elements if bulk array is populated
[linux-2.6-microblaze.git] / mm / page_alloc.c
index ef2265f..0422058 100644 (file)
@@ -5058,7 +5058,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
 
        /* Already populated array? */
        if (unlikely(page_array && nr_pages - nr_populated == 0))
-               return 0;
+               return nr_populated;
 
        /* Use the single page allocator for one page. */
        if (nr_pages - nr_populated == 1)