diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2022-06-05 17:25:37 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-06-16 19:48:29 -0700 |
commit | 446ec83805ddaab5b8734d30ba4ae8c56739a9b4 (patch) | |
tree | 8f8f3a65fa6bf8edd49b2890b79449e5f5ed4034 /mm/page_alloc.c | |
parent | 9384d79249d04b03572abb7e551a35d99c9268c0 (diff) | |
download | lwn-446ec83805ddaab5b8734d30ba4ae8c56739a9b4.tar.gz lwn-446ec83805ddaab5b8734d30ba4ae8c56739a9b4.zip |
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/20220605152539.3196045-1-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e008a3df0485..81fadb266973 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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; |