summaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2024-03-18 17:47:52 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-03-18 17:47:52 +0100
commit5e28061128646febc71c0942609619e29f41ff00 (patch)
tree9fc836e739a4f1f312a9891c6f6a675cd325959f /mm/compaction.c
parentmm/zswap: remove the memcpy if acomp is not sleepable (diff)
parentLinux 6.8 (diff)
downloadlinux-5e28061128646febc71c0942609619e29f41ff00.tar.xz
linux-5e28061128646febc71c0942609619e29f41ff00.zip
Merge branch 'master' into mm-stable
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 1faeffb28720..807b58e6eb68 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2827,16 +2827,11 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
unsigned int alloc_flags, const struct alloc_context *ac,
enum compact_priority prio, struct page **capture)
{
- int may_perform_io = (__force int)(gfp_mask & __GFP_IO);
struct zoneref *z;
struct zone *zone;
enum compact_result rc = COMPACT_SKIPPED;
- /*
- * Check if the GFP flags allow compaction - GFP_NOIO is really
- * tricky context because the migration might require IO
- */
- if (!may_perform_io)
+ if (!gfp_compaction_allowed(gfp_mask))
return COMPACT_SKIPPED;
trace_mm_compaction_try_to_compact_pages(order, gfp_mask, prio);