[PATCH] mm/vmscan: Remove redundant __GFP_NOWARN

Fushuai Wang posted 1 patch 2 months, 1 week ago
There is a newer version of this series
mm/vmscan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] mm/vmscan: Remove redundant __GFP_NOWARN
Posted by Fushuai Wang 2 months, 1 week ago
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.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
---
 mm/vmscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index b2fc8b626d3d..2acb3c09fe0d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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,
-- 
2.36.1
Re: [PATCH] mm/vmscan: Remove redundant __GFP_NOWARN
Posted by Matthew Wilcox 2 months, 1 week ago
On Sun, Oct 05, 2025 at 08:43:29PM +0800, Fushuai Wang wrote:
> -		.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.
Re: [PATCH] mm/vmscan: Remove redundant __GFP_NOWARN
Posted by Fushuai Wang 2 months, 1 week ago
>> -		.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.