summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJinliang Zheng <alexjlzheng@tencent.com>2023-08-08 11:44:32 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 23:37:48 +0300
commit9af7c7426c2e49bad77cf7494fea85a773d1ded6 (patch)
treee4deda8811fc6cf9e4ab82b9fa280f23290b3e63 /mm
parent97157d8908bc10dec22cc4479f4c5cc7db58a12c (diff)
downloadlinux-9af7c7426c2e49bad77cf7494fea85a773d1ded6.tar.xz
writeback: remove redundant checks for root memcg
The check for root memcg will be done in wb_get_lookup(), so remove the redundant one to simplify the code. Link: https://lkml.kernel.org/r/20230808084431.1632934-1-alexjlzheng@tencent.com Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/backing-dev.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index fc44bfbf785e..1e3447bccdb1 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -732,9 +732,6 @@ struct bdi_writeback *wb_get_create(struct backing_dev_info *bdi,
might_alloc(gfp);
- if (!memcg_css->parent)
- return &bdi->wb;
-
do {
wb = wb_get_lookup(bdi, memcg_css);
} while (!wb && !cgwb_create(bdi, memcg_css, gfp));