From: chenqiwu Date: Thu, 2 Apr 2020 04:09:50 +0000 (-0700) Subject: mm/page_alloc.c: use free_area_empty() instead of open-coding X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=76089d0082e6585e2ec53a51aa9d3c21579fc8e9;p=openwrt%2Fstaging%2Fblogic.git mm/page_alloc.c: use free_area_empty() instead of open-coding Use free_area_empty() API to replace list_empty() for better code readability. Signed-off-by: chenqiwu Signed-off-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Link: http://lkml.kernel.org/r/1583674354-7713-1-git-send-email-qiwuchen55@gmail.com Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2dedf5a1e49c..2a7d77b01604 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3460,8 +3460,7 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, return true; } #endif - if (alloc_harder && - !list_empty(&area->free_list[MIGRATE_HIGHATOMIC])) + if (alloc_harder && !free_area_empty(area, MIGRATE_HIGHATOMIC)) return true; } return false;