[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240320110222.6564-7-shikemeng@huaweicloud.com>
Date: Wed, 20 Mar 2024 19:02:22 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: akpm@...ux-foundation.org,
tj@...nel.org,
linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: willy@...radead.org,
bfoster@...hat.com,
jack@...e.cz,
dsterba@...e.com,
mjguzik@...il.com,
dhowells@...hat.com,
peterz@...radead.org
Subject: [PATCH 6/6] writeback: remove unneeded GDTC_INIT_NO_WB
We never use gdtc->dom set with GDTC_INIT_NO_WB, just remove unneeded
GDTC_INIT_NO_WB
Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
---
mm/page-writeback.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 481b6bf34c21..09b2b0754cc5 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -154,8 +154,6 @@ struct dirty_throttle_control {
.dom = &global_wb_domain, \
.wb_completions = &(__wb)->completions
-#define GDTC_INIT_NO_WB .dom = &global_wb_domain
-
#define MDTC_INIT(__wb, __gdtc) .wb = (__wb), \
.dom = mem_cgroup_wb_domain(__wb), \
.wb_completions = &(__wb)->memcg_completions, \
@@ -210,7 +208,6 @@ static void wb_min_max_ratio(struct bdi_writeback *wb,
#define GDTC_INIT(__wb) .wb = (__wb), \
.wb_completions = &(__wb)->completions
-#define GDTC_INIT_NO_WB
#define MDTC_INIT(__wb, __gdtc)
static bool mdtc_valid(struct dirty_throttle_control *dtc)
@@ -438,7 +435,7 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
*/
void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty)
{
- struct dirty_throttle_control gdtc = { GDTC_INIT_NO_WB };
+ struct dirty_throttle_control gdtc = { };
gdtc.avail = global_dirtyable_memory();
domain_dirty_limits(&gdtc);
@@ -895,7 +892,7 @@ unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh)
unsigned long wb_calc_cg_thresh(struct bdi_writeback *wb)
{
- struct dirty_throttle_control gdtc = { GDTC_INIT_NO_WB };
+ struct dirty_throttle_control gdtc = { };
struct dirty_throttle_control mdtc = { MDTC_INIT(wb, &gdtc) };
unsigned long filepages, headroom, writeback;
--
2.30.0
Powered by blists - more mailing lists