Skip to content

Commit

Permalink
mm/page_alloc: use might_alloc()
Browse files Browse the repository at this point in the history
...  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]>
  • Loading branch information
danvet authored and akpm00 committed Jun 17, 2022
1 parent 9384d79 commit 446ec83
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5197,10 +5197,7 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order,
*alloc_flags |= ALLOC_CPUSET;
}

fs_reclaim_acquire(gfp_mask);
fs_reclaim_release(gfp_mask);

might_sleep_if(gfp_mask & __GFP_DIRECT_RECLAIM);
might_alloc(gfp_mask);

if (should_fail_alloc_page(gfp_mask, order))
return false;
Expand Down

0 comments on commit 446ec83

Please sign in to comment.