]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
blk-cgroup: remove redundant __GFP_NOWARN
authorQianfeng Rong <rongqianfeng@vivo.com>
Sat, 9 Aug 2025 14:13:58 +0000 (22:13 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 11 Aug 2025 13:59:40 +0000 (07:59 -0600)
Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
GFP_NOWAIT implicitly include __GFP_NOWARN.

Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
`GFP_NOWAIT | __GFP_NOWARN`) is now redundant.  Let's clean up these
redundant flags across subsystems.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20250809141358.168781-1-rongqianfeng@vivo.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c

index 5936db7f8475bff1d7c0219b5ad44423cd8d47c1..fe9ebd6a2e14d1f2414acd48f28549c16717348a 100644 (file)
@@ -394,7 +394,7 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, struct gendisk *disk,
 
        /* allocate */
        if (!new_blkg) {
-               new_blkg = blkg_alloc(blkcg, disk, GFP_NOWAIT | __GFP_NOWARN);
+               new_blkg = blkg_alloc(blkcg, disk, GFP_NOWAIT);
                if (unlikely(!new_blkg)) {
                        ret = -ENOMEM;
                        goto err_put_css;
@@ -1467,7 +1467,7 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
 
        spin_lock_init(&blkcg->lock);
        refcount_set(&blkcg->online_pin, 1);
-       INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_NOWAIT | __GFP_NOWARN);
+       INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_NOWAIT);
        INIT_HLIST_HEAD(&blkcg->blkg_list);
 #ifdef CONFIG_CGROUP_WRITEBACK
        INIT_LIST_HEAD(&blkcg->cgwb_list);
@@ -1630,7 +1630,7 @@ retry:
                        pd_prealloc = NULL;
                } else {
                        pd = pol->pd_alloc_fn(disk, blkg->blkcg,
-                                             GFP_NOWAIT | __GFP_NOWARN);
+                                             GFP_NOWAIT);
                }
 
                if (!pd) {