Re: [PATCH] md/raid5: remove redundant __GFP_NOWARN

From: Xiao Ni
Date: Tue Nov 04 2025 - 03:05:13 EST


On Sun, Nov 2, 2025 at 11:27 PM Huiwen He <hehuiwen@xxxxxxxxxx> wrote:
>
> 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: Huiwen He <hehuiwen@xxxxxxxxxx>
> ---
> drivers/md/raid5-cache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
> index ba768ca7f422..e29e69335c69 100644
> --- a/drivers/md/raid5-cache.c
> +++ b/drivers/md/raid5-cache.c
> @@ -3104,7 +3104,7 @@ int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev)
> goto out_mempool;
>
> spin_lock_init(&log->tree_lock);
> - INIT_RADIX_TREE(&log->big_stripe_tree, GFP_NOWAIT | __GFP_NOWARN);
> + INIT_RADIX_TREE(&log->big_stripe_tree, GFP_NOWAIT);
>
> thread = md_register_thread(r5l_reclaim_thread, log->rdev->mddev,
> "reclaim");
> --
> 2.25.1
>
>

Hi

It still has other places that use __GFP_NOWARN in raid5.c, do you
want to remove it together?

Anyway, the patch looks good to me.
Reviewed-by: Xiao Ni <xni@xxxxxxxxxx>