diff mbox series

writeback: remove redundant checks for root memcg

Message ID 20230808084431.1632934-1-alexjlzheng@tencent.com (mailing list archive)
State New
Headers show
Series writeback: remove redundant checks for root memcg | expand

Commit Message

Jinliang Zheng Aug. 8, 2023, 8:44 a.m. UTC
From: Jinliang Zheng <alexjlzheng@tencent.com>

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@tencent.com>
---
 mm/backing-dev.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

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));