Skip to contentSkip to conversation

mm/vmscan: Remove redundant __GFP_NOWARN

PATCH Superseded Fushuai Wang 2 participants 3 messages Oct 5, 2025 – Oct 6, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/vmscan: Remove redundant __GFP_NOWARN

The __GFP_NOWARN flag was included in GFP_NOWAIT since commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT"). So remove the redundant __GFP_NOWARN flag.

---
 mm/vmscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmscan.c +2 -2
index b2fc8b626d3d..2acb3c09fe0d 100644
@@ -1054,8 +1054,8 @@ static unsigned int demote_folio_list(struct list_head *demote_folios,
 		 * When this happens, 'page' will likely just be discarded
 		 * instead of migrated.
 		 */
-		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOWARN |
-			__GFP_NOMEMALLOC | GFP_NOWAIT,
+		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOMEMALLOC |
+			GFP_NOWAIT,
 		.nid = target_nid,
 		.nmask = &allowed_mask,
 		.reason = MR_DEMOTION,
Signature · 1 line
2.36.1
#1 lore raw

mm/vmscan.c static unsigned int demote_folio_list(struct list_head *demote_folios, · line 1058

Quoted 4 lines · Fushuai Wang
mm/vmscan.c +2 -2
-		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOWARN |
-			__GFP_NOMEMALLOC | GFP_NOWAIT,
+		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOMEMALLOC |
+			GFP_NOWAIT,

Please just remove the NOWARN. There's no need to reflow the other flags and break the 80 column limit.

#2 lore raw
Quoted 7 lines

mm/vmscan.c static unsigned int demote_folio_list(struct list_head *demote_folios, · line 1058

Quoted 4 lines
mm/vmscan.c +2 -2
-		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOWARN |
-			__GFP_NOMEMALLOC | GFP_NOWAIT,
+		.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) | __GFP_NOMEMALLOC |
+			GFP_NOWAIT,

Please just remove the NOWARN. There's no need to reflow the other flags and break the 80 column limit.

OK, I will send a v2 shortly.

Regards,
Wang.