Skip to content

Commit 196447c

Browse files
qianfengrongaxboe
authored andcommitted
blk-cgroup: remove redundant __GFP_NOWARN
Commit 16f5dfb ("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>
1 parent 8f3e4e8 commit 196447c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

block/blk-cgroup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, struct gendisk *disk,
394394

395395
/* allocate */
396396
if (!new_blkg) {
397-
new_blkg = blkg_alloc(blkcg, disk, GFP_NOWAIT | __GFP_NOWARN);
397+
new_blkg = blkg_alloc(blkcg, disk, GFP_NOWAIT);
398398
if (unlikely(!new_blkg)) {
399399
ret = -ENOMEM;
400400
goto err_put_css;
@@ -1467,7 +1467,7 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
14671467

14681468
spin_lock_init(&blkcg->lock);
14691469
refcount_set(&blkcg->online_pin, 1);
1470-
INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_NOWAIT | __GFP_NOWARN);
1470+
INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_NOWAIT);
14711471
INIT_HLIST_HEAD(&blkcg->blkg_list);
14721472
#ifdef CONFIG_CGROUP_WRITEBACK
14731473
INIT_LIST_HEAD(&blkcg->cgwb_list);
@@ -1630,7 +1630,7 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol)
16301630
pd_prealloc = NULL;
16311631
} else {
16321632
pd = pol->pd_alloc_fn(disk, blkg->blkcg,
1633-
GFP_NOWAIT | __GFP_NOWARN);
1633+
GFP_NOWAIT);
16341634
}
16351635

16361636
if (!pd) {

0 commit comments

Comments
 (0)