pagetrace: fix /proc/pagetrace lost in 64bit os [1/1]

PD#SWPL-14800

Problem:
/proc/pagetrace is not exist in 64bit kernel.

Solution:
Using right macro for create fs node.

Verify:
x301

Change-Id: I27b8db9a349f37db4bc0d6752b06f3d6a6a6c46c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
This commit is contained in:
Tao Zeng
2019-11-07 15:37:53 +08:00
committed by Luke Go
parent 94de04350d
commit b71bdd47e6

View File

@@ -1621,16 +1621,18 @@ static const struct file_operations slabtrace_file_ops = {
static int __init page_trace_module_init(void)
{
#ifndef CONFIG_64BIT
#ifdef CONFIG_64BIT
d_pagetrace = proc_create("pagetrace", 0444,
NULL, &pagetrace_file_ops);
#else
if (!page_trace_disable)
d_pagetrace = proc_create("pagetrace", 0444,
NULL, &pagetrace_file_ops);
#endif
if (IS_ERR_OR_NULL(d_pagetrace)) {
pr_err("%s, create sysfs failed\n", __func__);
return -1;
}
#endif
#ifdef CONFIG_AMLOGIC_SLAB_TRACE
if (slab_trace_en)