[next -v1 1/5] memcg: use OFP_PEAK_UNSET instead of -1

From: Chen Ridong
Date: Thu Dec 05 2024 - 20:45:44 EST


From: Chen Ridong <chenridong@xxxxxxxxxx>

The 'OFP_PEAK_UNSET' has been defined, use it instead of '-1'.

Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7b3503d12aaf..fc18633aba5d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4014,7 +4014,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