[PATCH] writeback: remove redundant checks for root memcg
From: alexjlzheng
Date: Tue Aug 08 2023 - 13:43:09 EST
From: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
The check for root memcg will be done in wb_get_lookup(), so remove the
redundant one to simplify the code.
Signed-off-by: Jinliang Zheng <alexjlzheng@xxxxxxxxxxx>
---
mm/backing-dev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 3ffc3cfa7a14..9076f3ad39de 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -733,9 +733,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));
--
2.31.1