mm-vmscan-account-for-free-pages-to-prevent-infinite-loop-in-throttle_direct_reclaim-checkpatch-fixes

ERROR: trailing whitespace
#40: FILE: mm/vmscan.c:378:
+^I * If there are no reclaimable file-backed or anonymous pages, $

ERROR: trailing whitespace
#41: FILE: mm/vmscan.c:379:
+^I * ensure zones with sufficient free pages are not skipped. $

ERROR: trailing whitespace
#42: FILE: mm/vmscan.c:380:
+^I * This prevents zones like DMA32 from being ignored in reclaim $

WARNING: suspect code indent for conditional statements (8, 12)
#45: FILE: mm/vmscan.c:383:
+	if (nr == 0)
+	    nr = zone_page_state_snapshot(zone, NR_FREE_PAGES);

total: 3 errors, 1 warnings, 15 lines checked

Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Seiji Nishikawa <snishika@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Andrew Morton 2024-11-30 18:44:24 -08:00
parent 9a5bc9a1bc
commit 32839ff14b

View File

@ -381,7 +381,7 @@ unsigned long zone_reclaimable_pages(struct zone *zone)
* scenarios where they can still help alleviate memory pressure.
*/
if (nr == 0)
nr = zone_page_state_snapshot(zone, NR_FREE_PAGES);
nr = zone_page_state_snapshot(zone, NR_FREE_PAGES);
return nr;
}