Commit 9707aff7 authored by Lu Jialin's avatar Lu Jialin Committed by akpm

mm/memcontrol.c: remove unused private flag of memory.oom_control

There is no use for the private value, __OOM_TYPE and OOM notifier
OOM_CONTROL.  Therefore remove them to make the code clean.

Link: https://lkml.kernel.org/r/20220421122755.40899-1-lujialin4@huawei.comSigned-off-by: default avatarLu Jialin <lujialin4@huawei.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Acked-by: default avatarShakeel Butt <shakeelb@google.com>
Acked-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ef7a4ffc
...@@ -209,7 +209,6 @@ static struct move_charge_struct { ...@@ -209,7 +209,6 @@ static struct move_charge_struct {
enum res_type { enum res_type {
_MEM, _MEM,
_MEMSWAP, _MEMSWAP,
_OOM_TYPE,
_KMEM, _KMEM,
_TCP, _TCP,
}; };
...@@ -217,8 +216,6 @@ enum res_type { ...@@ -217,8 +216,6 @@ enum res_type {
#define MEMFILE_PRIVATE(x, val) ((x) << 16 | (val)) #define MEMFILE_PRIVATE(x, val) ((x) << 16 | (val))
#define MEMFILE_TYPE(val) ((val) >> 16 & 0xffff) #define MEMFILE_TYPE(val) ((val) >> 16 & 0xffff)
#define MEMFILE_ATTR(val) ((val) & 0xffff) #define MEMFILE_ATTR(val) ((val) & 0xffff)
/* Used for OOM notifier */
#define OOM_CONTROL (0)
/* /*
* Iteration constructs for visiting all cgroups (under a tree). If * Iteration constructs for visiting all cgroups (under a tree). If
...@@ -4887,7 +4884,6 @@ static struct cftype mem_cgroup_legacy_files[] = { ...@@ -4887,7 +4884,6 @@ static struct cftype mem_cgroup_legacy_files[] = {
.name = "oom_control", .name = "oom_control",
.seq_show = mem_cgroup_oom_control_read, .seq_show = mem_cgroup_oom_control_read,
.write_u64 = mem_cgroup_oom_control_write, .write_u64 = mem_cgroup_oom_control_write,
.private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
}, },
{ {
.name = "pressure_level", .name = "pressure_level",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment