linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mm/page_alloc: use might_alloc()
@ 2022-06-05 15:25 Daniel Vetter
  2022-06-05 15:25 ` [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before() Daniel Vetter
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Daniel Vetter @ 2022-06-05 15:25 UTC (permalink / raw)
  To: LKML
  Cc: DRI Development, Daniel Vetter, Daniel Vetter, Andrew Morton, linux-mm

... instead of open codding it. Completely equivalent code, just
a notch more meaningful when reading.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
 mm/page_alloc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2db95780e003..277774d170cb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5177,10 +5177,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;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-14 13:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 15:25 [PATCH 1/3] mm/page_alloc: use might_alloc() Daniel Vetter
2022-06-05 15:25 ` [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before() Daniel Vetter
2022-06-07 12:59   ` David Hildenbrand
2022-06-12 23:00   ` David Rientjes
2022-06-13  3:21   ` Muchun Song
2022-06-14 13:05   ` Vlastimil Babka
2022-06-05 15:25 ` [PATCH 3/3] mm/mempool: use might_alloc() Daniel Vetter
2022-06-14 13:08   ` Vlastimil Babka (SUSE)
2022-06-07 12:57 ` [PATCH 1/3] mm/page_alloc: " David Hildenbrand
2022-06-14 13:07 ` Vlastimil Babka (SUSE)

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).