mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
memcg: use OFP_PEAK_UNSET instead of -1
Patch series "Some cleanup for memcg", v4. This patch (of 4): The 'OFP_PEAK_UNSET' has been defined, use it instead of '-1'. Link: https://lkml.kernel.org/r/20250124073514.2375622-1-chenridong@huaweicloud.com Link: https://lkml.kernel.org/r/20250124073514.2375622-2-chenridong@huaweicloud.com Signed-off-by: Chen Ridong <chenridong@huawei.com> Reviewed-by: Michal Koutný <mkoutny@suse.com> Acked-by: David Finkel <davidf@vimeo.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Cc: Michal Hocko <mhocko@suse.com> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wang Weiyang <wangweiyang2@huawei.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
6a36757715
commit
1c81f1a699
|
|
@ -4013,7 +4013,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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user