mm: compaction: make __compact_pgdat() and compact_pgdat() return void
[linux-2.6-microblaze.git] / mm / compaction.c
index c62bd06..5d5b0b2 100644 (file)
@@ -611,8 +611,7 @@ check_compact_cluster:
                continue;
 
 next_pageblock:
-               low_pfn += pageblock_nr_pages;
-               low_pfn = ALIGN(low_pfn, pageblock_nr_pages) - 1;
+               low_pfn = ALIGN(low_pfn + 1, pageblock_nr_pages) - 1;
                last_pageblock_nr = pageblock_nr;
        }
 
@@ -795,7 +794,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
        low_pfn = max(cc->migrate_pfn, zone->zone_start_pfn);
 
        /* Only scan within a pageblock boundary */
-       end_pfn = ALIGN(low_pfn + pageblock_nr_pages, pageblock_nr_pages);
+       end_pfn = ALIGN(low_pfn + 1, pageblock_nr_pages);
 
        /* Do not cross the free scanner or scan within a memory hole */
        if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) {
@@ -1086,7 +1085,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist,
 
 
 /* Compact all zones within a node */
-static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
+static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
 {
        int zoneid;
        struct zone *zone;
@@ -1119,28 +1118,26 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
                VM_BUG_ON(!list_empty(&cc->freepages));
                VM_BUG_ON(!list_empty(&cc->migratepages));
        }
-
-       return 0;
 }
 
-int compact_pgdat(pg_data_t *pgdat, int order)
+void compact_pgdat(pg_data_t *pgdat, int order)
 {
        struct compact_control cc = {
                .order = order,
                .sync = false,
        };
 
-       return __compact_pgdat(pgdat, &cc);
+       __compact_pgdat(pgdat, &cc);
 }
 
-static int compact_node(int nid)
+static void compact_node(int nid)
 {
        struct compact_control cc = {
                .order = -1,
                .sync = true,
        };
 
-       return __compact_pgdat(NODE_DATA(nid), &cc);
+       __compact_pgdat(NODE_DATA(nid), &cc);
 }
 
 /* Compact all nodes in the system */