Skip to content

Commit e1dbeda

Browse files
Andrew MortonLinus Torvalds
authored andcommitted
[PATCH] balance_pdgat() cleanup
Despaghettify balance_pdgat() a bit. Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent cc10250 commit e1dbeda

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mm/vmscan.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,11 +1172,12 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order)
11721172
if (!zone_watermark_ok(zone, order, zone->pages_high,
11731173
0, 0)) {
11741174
end_zone = i;
1175-
goto scan;
1175+
break;
11761176
}
11771177
}
1178-
goto out;
1179-
scan:
1178+
if (i < 0)
1179+
goto out;
1180+
11801181
for (i = 0; i <= end_zone; i++) {
11811182
struct zone *zone = pgdat->node_zones + i;
11821183

0 commit comments

Comments
 (0)