Revert "lowmemorykiller: Do proper NULL checks"

This reverts commit a7d54d72883cf7cb31c059e31125695babbf2b8d.
This commit is contained in:
Thierry Strudel 2015-12-22 10:06:56 -08:00 committed by syphyr
parent dece380b97
commit 9174c4f83f
1 changed files with 5 additions and 7 deletions

View File

@ -134,7 +134,7 @@ void tune_lmk_zone_param(struct zonelist *zonelist, int classzone_idx,
for_each_zone_zonelist(zone, zoneref, zonelist, MAX_NR_ZONES) {
zone_idx = zonelist_zone_idx(zoneref);
if (zone_idx == ZONE_MOVABLE) {
if (!use_cma_pages && other_free)
if (!use_cma_pages)
*other_free -=
zone_page_state(zone, NR_FREE_CMA_PAGES);
continue;
@ -150,8 +150,7 @@ void tune_lmk_zone_param(struct zonelist *zonelist, int classzone_idx,
- zone_page_state(zone, NR_SHMEM)
- zone_page_state(zone, NR_SWAPCACHE);
} else if (zone_idx < classzone_idx) {
if (zone_watermark_ok(zone, 0, 0, classzone_idx, 0) &&
other_free) {
if (zone_watermark_ok(zone, 0, 0, classzone_idx, 0)) {
if (!use_cma_pages) {
*other_free -= min(
zone->lowmem_reserve[classzone_idx] +
@ -163,10 +162,9 @@ void tune_lmk_zone_param(struct zonelist *zonelist, int classzone_idx,
*other_free -=
zone->lowmem_reserve[classzone_idx];
}
} else {
if (other_free)
*other_free -=
zone_page_state(zone, NR_FREE_PAGES);
} else {
*other_free -=
zone_page_state(zone, NR_FREE_PAGES);
}
}
}