* [PATCH v2] mm/page_alloc: use free_area_empty() instead of open-coding
@ 2020-03-08 13:32 qiwuchen55
2020-03-08 14:03 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: qiwuchen55 @ 2020-03-08 13:32 UTC (permalink / raw)
To: akpm, willy; +Cc: linux-mm, chenqiwu
From: chenqiwu <chenqiwu@xiaomi.com>
Use free_area_empty() API to replace list_empty() for better
code readability.
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
mm/page_alloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 79e950d..e78b780 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] mm/page_alloc: use free_area_empty() instead of open-coding
2020-03-08 13:32 [PATCH v2] mm/page_alloc: use free_area_empty() instead of open-coding qiwuchen55
@ 2020-03-08 14:03 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2020-03-08 14:03 UTC (permalink / raw)
To: qiwuchen55; +Cc: akpm, linux-mm, chenqiwu
On Sun, Mar 08, 2020 at 09:32:34PM +0800, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use free_area_empty() API to replace list_empty() for better
> code readability.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-08 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 13:32 [PATCH v2] mm/page_alloc: use free_area_empty() instead of open-coding qiwuchen55
2020-03-08 14:03 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).