Commit 7103f16d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

mm: compaction: make __compact_pgdat() and compact_pgdat() return void

These functions always return 0.  Formalise this.

Cc: Jason Liu <>
Cc: KAMEZAWA Hiroyuki <>
Cc: Mel Gorman <>
Cc: Minchan Kim <>
Cc: Rik van Riel <>
Acked-by: default avatarDavid Rientjes <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1998cc04
......@@ -23,7 +23,7 @@ extern int fragmentation_index(struct zone *zone, unsigned int order);
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
int order, gfp_t gfp_mask, nodemask_t *mask,
bool sync, bool *contended);
extern int compact_pgdat(pg_data_t *pgdat, int order);
extern void compact_pgdat(pg_data_t *pgdat, int order);
extern void reset_isolation_suitable(pg_data_t *pgdat);
extern unsigned long compaction_suitable(struct zone *zone, int order);
......@@ -80,9 +80,8 @@ static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
static inline int compact_pgdat(pg_data_t *pgdat, int order)
static inline void compact_pgdat(pg_data_t *pgdat, int order)
static inline void reset_isolation_suitable(pg_data_t *pgdat)
......@@ -1085,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;
......@@ -1118,28 +1118,26 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment