From: alexjlzheng@gmail.com
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Jinliang Zheng <alexjlzheng@tencent.com>
Subject: [PATCH] writeback: remove redundant checks for root memcg
Date: Tue, 8 Aug 2023 16:44:32 +0800 [thread overview]
Message-ID: <20230808084431.1632934-1-alexjlzheng@tencent.com> (raw)
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
reply other threads:[~2023-08-08 8:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230808084431.1632934-1-alexjlzheng@tencent.com \
--to=alexjlzheng@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexjlzheng@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox