Skip to content

Commit 446ec83

Browse files
danvetakpm00
authored andcommitted
mm/page_alloc: use might_alloc()
... instead of open coding it. Completely equivalent code, just a notch more meaningful when reading. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: David Rientjes <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Roman Gushchin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9384d79 commit 446ec83

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,10 +5197,7 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order,
51975197
*alloc_flags |= ALLOC_CPUSET;
51985198
}
51995199

5200-
fs_reclaim_acquire(gfp_mask);
5201-
fs_reclaim_release(gfp_mask);
5202-
5203-
might_sleep_if(gfp_mask & __GFP_DIRECT_RECLAIM);
5200+
might_alloc(gfp_mask);
52045201

52055202
if (should_fail_alloc_page(gfp_mask, order))
52065203
return false;

0 commit comments

Comments
 (0)