mm/page_alloc: use free_area_empty() instead of open-coding
Subsystems (2)
PATCH v2 1/1 mm/page_alloc: use free_area_empty() instead of open-coding
From: chenqiwu <[email protected]>
Use free_area_empty() API to replace list_empty() for better code readability.
Signed-off-by chenqiwu <[email protected]>
--- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/page_alloc.c +1 -2
@@ -3533,8 +3533,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;
Signature · 1 line
1.9.1
Quoted 6 lines · On Sun, Mar 08, 2020 at 09:32:34PM +0800, [email protected] wrote:
From: chenqiwu <[email protected]>
Use
free_area_empty()API to replacelist_empty()for better code readability.Signed-off-by chenqiwu <[email protected]>
Reviewed-by Matthew Wilcox (Oracle) <[email protected]>