drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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@kylinos.cn>
---
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
On Sun, Nov 2, 2025 at 11:27 PM Huiwen He <hehuiwen@kylinos.cn> 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@kylinos.cn>
> ---
> 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@redhat.com>
Hi Xiao Ni, Thank you for your review and feedback. The reason for removing `__GFP_NOWARN` in `r5l_init_log()` is that it is already implied by `GFP_NOWAIT`. However, I noticed that `__GFP_NOWARN` is used independently in `raid5.c`, so removing it there maybe incorrect. Best regards, Huiwen He
On Tue, Nov 4, 2025 at 5:35 PM Huiwen He <hehuiwen@kylinos.cn> wrote: > > Hi Xiao Ni, > > Thank you for your review and feedback. > > The reason for removing `__GFP_NOWARN` in `r5l_init_log()` is that > it is already implied by `GFP_NOWAIT`. However, I noticed that > `__GFP_NOWARN` is used independently in `raid5.c`, so removing it > there maybe incorrect. > > Best regards, > Huiwen He > I c, thanks for pointing that out. Regards Xiao
在 2025/11/2 23:25, Huiwen He 写道:
> 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@kylinos.cn>
> ---
> 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");
This patch seems to have been sent twice.
LGTM
Reviewed-by: Li Nan <linan122@huawei.com>
--
Thanks,
Nan
© 2016 - 2026 Red Hat, Inc.