mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 03:06:43 +00:00
mm: memory-failure: move sysctl register in memory_failure_init()
There is already a memory_failure_init(), don't add a new initcall, move register_sysctl_init() into it to cleanup a bit. Link: https://lkml.kernel.org/r/20230508114128.37081-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
870388db25
commit
97de10a993
@ -123,7 +123,6 @@ const struct attribute_group memory_failure_attr_group = {
|
|||||||
.attrs = memory_failure_attr,
|
.attrs = memory_failure_attr,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
|
||||||
static struct ctl_table memory_failure_table[] = {
|
static struct ctl_table memory_failure_table[] = {
|
||||||
{
|
{
|
||||||
.procname = "memory_failure_early_kill",
|
.procname = "memory_failure_early_kill",
|
||||||
@ -146,14 +145,6 @@ static struct ctl_table memory_failure_table[] = {
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init memory_failure_sysctl_init(void)
|
|
||||||
{
|
|
||||||
register_sysctl_init("vm", memory_failure_table);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
late_initcall(memory_failure_sysctl_init);
|
|
||||||
#endif /* CONFIG_SYSCTL */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return values:
|
* Return values:
|
||||||
* 1: the page is dissolved (if needed) and taken off from buddy,
|
* 1: the page is dissolved (if needed) and taken off from buddy,
|
||||||
@ -2441,6 +2432,8 @@ static int __init memory_failure_init(void)
|
|||||||
INIT_WORK(&mf_cpu->work, memory_failure_work_func);
|
INIT_WORK(&mf_cpu->work, memory_failure_work_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
register_sysctl_init("vm", memory_failure_table);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
core_initcall(memory_failure_init);
|
core_initcall(memory_failure_init);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user