mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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 <chenqiwu@xiaomi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: http://lkml.kernel.org/r/1583674354-7713-1-git-send-email-qiwuchen55@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
736838e964
commit
76089d0082
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue