summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Jialin <lujialin4@huawei.com>2022-04-28 23:16:00 -0700
committerakpm <akpm@linux-foundation.org>2022-04-28 23:16:00 -0700
commit9707aff701e325e7c4660409c43392ff2fb36fad (patch)
tree524610c9d7ec2b06bd39b176df0dbb693abb16e6
parentef7a4ffc4c7f969d61e297c53cb2de1d6f012a11 (diff)
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.com Signed-off-by: Lu Jialin <lujialin4@huawei.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Shakeel Butt <shakeelb@google.com> Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/memcontrol.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5cf5e32de313..c1f888313462 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -209,7 +209,6 @@ static struct move_charge_struct {
enum res_type {
_MEM,
_MEMSWAP,
- _OOM_TYPE,
_KMEM,
_TCP,
};
@@ -217,8 +216,6 @@ enum res_type {
#define MEMFILE_PRIVATE(x, val) ((x) << 16 | (val))
#define MEMFILE_TYPE(val) ((val) >> 16 & 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
@@ -4887,7 +4884,6 @@ static struct cftype mem_cgroup_legacy_files[] = {
.name = "oom_control",
.seq_show = mem_cgroup_oom_control_read,
.write_u64 = mem_cgroup_oom_control_write,
- .private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
},
{
.name = "pressure_level",