linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] writeback: remove redundant checks for root memcg
@ 2023-08-08  8:44 alexjlzheng
  0 siblings, 0 replies; only message in thread
From: alexjlzheng @ 2023-08-08  8:44 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Jinliang Zheng

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-08  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08  8:44 [PATCH] writeback: remove redundant checks for root memcg alexjlzheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox