Skip to content

Commit

Permalink
[PATCH] balance_pdgat() cleanup
Browse files Browse the repository at this point in the history
Despaghettify balance_pdgat() a bit.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Dec 7, 2006
1 parent cc10250 commit e1dbeda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,11 +1172,12 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order)
if (!zone_watermark_ok(zone, order, zone->pages_high,
0, 0)) {
end_zone = i;
goto scan;
break;
}
}
goto out;
scan:
if (i < 0)
goto out;

for (i = 0; i <= end_zone; i++) {
struct zone *zone = pgdat->node_zones + i;

Expand Down

0 comments on commit e1dbeda

Please sign in to comment.