mm: use proper type for cma_[alloc|release]
[linux-2.6-block.git] / mm / page_alloc.c
index 64d4aae2a78abcd7903ba9c13fffcd8ac3198b39..d12299c08b95c4f90947c93e7994824098792292 100644 (file)
@@ -8681,7 +8681,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
                .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
        };
 
-       migrate_prep();
+       lru_cache_disable();
 
        while (pfn < end || !list_empty(&cc->migratepages)) {
                if (fatal_signal_pending(current)) {
@@ -8715,6 +8715,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
                if (ret == -ENOMEM)
                        break;
        }
+
+       lru_cache_enable();
        if (ret < 0) {
                alloc_contig_dump_pages(&cc->migratepages);
                putback_movable_pages(&cc->migratepages);
@@ -8971,9 +8973,9 @@ struct page *alloc_contig_pages(unsigned long nr_pages, gfp_t gfp_mask,
 }
 #endif /* CONFIG_CONTIG_ALLOC */
 
-void free_contig_range(unsigned long pfn, unsigned int nr_pages)
+void free_contig_range(unsigned long pfn, unsigned long nr_pages)
 {
-       unsigned int count = 0;
+       unsigned long count = 0;
 
        for (; nr_pages--; pfn++) {
                struct page *page = pfn_to_page(pfn);
@@ -8981,7 +8983,7 @@ void free_contig_range(unsigned long pfn, unsigned int nr_pages)
                count += page_count(page) != 1;
                __free_page(page);
        }
-       WARN(count != 0, "%d pages are still in use!\n", count);
+       WARN(count != 0, "%lu pages are still in use!\n", count);
 }
 EXPORT_SYMBOL(free_contig_range);