aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-02-22 19:32:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 20:50:10 -0500
commit7103f16dbff20fa969c9500902d980d17f953fa6 (patch)
tree96d9bd87587789d4186df826f430e4fb60e67643
parent1998cc048901109a29924380b8e91bc049b32951 (diff)
mm: compaction: make __compact_pgdat() and compact_pgdat() return void
These functions always return 0. Formalise this. Cc: Jason Liu <r64343@freescale.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/compaction.h5
-rw-r--r--mm/compaction.c12
2 files changed, 7 insertions, 10 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index cc7bddeaf553..091d72e70d8a 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -23,7 +23,7 @@ extern int fragmentation_index(struct zone *zone, unsigned int order);
23extern unsigned long try_to_compact_pages(struct zonelist *zonelist, 23extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
24 int order, gfp_t gfp_mask, nodemask_t *mask, 24 int order, gfp_t gfp_mask, nodemask_t *mask,
25 bool sync, bool *contended); 25 bool sync, bool *contended);
26extern int compact_pgdat(pg_data_t *pgdat, int order); 26extern void compact_pgdat(pg_data_t *pgdat, int order);
27extern void reset_isolation_suitable(pg_data_t *pgdat); 27extern void reset_isolation_suitable(pg_data_t *pgdat);
28extern unsigned long compaction_suitable(struct zone *zone, int order); 28extern unsigned long compaction_suitable(struct zone *zone, int order);
29 29
@@ -80,9 +80,8 @@ static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
80 return COMPACT_CONTINUE; 80 return COMPACT_CONTINUE;
81} 81}
82 82
83static inline int compact_pgdat(pg_data_t *pgdat, int order) 83static inline void compact_pgdat(pg_data_t *pgdat, int order)
84{ 84{
85 return COMPACT_CONTINUE;
86} 85}
87 86
88static inline void reset_isolation_suitable(pg_data_t *pgdat) 87static inline void reset_isolation_suitable(pg_data_t *pgdat)
diff --git a/mm/compaction.c b/mm/compaction.c
index 0d0248db36d8..5d5b0b259bc9 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1085,7 +1085,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist,
1085 1085
1086 1086
1087/* Compact all zones within a node */ 1087/* Compact all zones within a node */
1088static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc) 1088static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
1089{ 1089{
1090 int zoneid; 1090 int zoneid;
1091 struct zone *zone; 1091 struct zone *zone;
@@ -1118,28 +1118,26 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
1118 VM_BUG_ON(!list_empty(&cc->freepages)); 1118 VM_BUG_ON(!list_empty(&cc->freepages));
1119 VM_BUG_ON(!list_empty(&cc->migratepages)); 1119 VM_BUG_ON(!list_empty(&cc->migratepages));
1120 } 1120 }
1121
1122 return 0;
1123} 1121}
1124 1122
1125int compact_pgdat(pg_data_t *pgdat, int order) 1123void compact_pgdat(pg_data_t *pgdat, int order)
1126{ 1124{
1127 struct compact_control cc = { 1125 struct compact_control cc = {
1128 .order = order, 1126 .order = order,
1129 .sync = false, 1127 .sync = false,
1130 }; 1128 };
1131 1129
1132 return __compact_pgdat(pgdat, &cc); 1130 __compact_pgdat(pgdat, &cc);
1133} 1131}
1134 1132
1135static int compact_node(int nid) 1133static void compact_node(int nid)
1136{ 1134{
1137 struct compact_control cc = { 1135 struct compact_control cc = {
1138 .order = -1, 1136 .order = -1,
1139 .sync = true, 1137 .sync = true,
1140 }; 1138 };
1141 1139
1142 return __compact_pgdat(NODE_DATA(nid), &cc); 1140 __compact_pgdat(NODE_DATA(nid), &cc);
1143} 1141}
1144 1142
1145/* Compact all nodes in the system */ 1143/* Compact all nodes in the system */