[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250114122519.1404275-2-chenridong@huaweicloud.com>
Date: Tue, 14 Jan 2025 12:25:16 +0000
From: Chen Ridong <chenridong@...weicloud.com>
To: akpm@...ux-foundation.org,
mhocko@...nel.org,
hannes@...xchg.org,
yosryahmed@...gle.com,
roman.gushchin@...ux.dev,
shakeel.butt@...ux.dev,
muchun.song@...ux.dev,
davidf@...eo.com,
vbabka@...e.cz,
mkoutny@...e.com
Cc: linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org,
chenridong@...wei.com,
wangweiyang2@...wei.com
Subject: [PATCH -v2 next 1/4] memcg: use OFP_PEAK_UNSET instead of -1
From: Chen Ridong <chenridong@...wei.com>
The 'OFP_PEAK_UNSET' has been defined, use it instead of '-1'.
Signed-off-by: Chen Ridong <chenridong@...wei.com>
Reviewed-by: Michal Koutný <mkoutny@...e.com>
Acked-by: David Finkel <davidf@...eo.com>
Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 46f8b372d212..05a32c860554 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4004,7 +4004,7 @@ static ssize_t peak_write(struct kernfs_open_file *of, char *buf, size_t nbytes,
WRITE_ONCE(peer_ctx->value, usage);
/* initial write, register watcher */
- if (ofp->value == -1)
+ if (ofp->value == OFP_PEAK_UNSET)
list_add(&ofp->list, watchers);
WRITE_ONCE(ofp->value, usage);
--
2.34.1
Powered by blists - more mailing lists