summaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ebff729cc956..bc43c7838778 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2753,11 +2753,8 @@ static const struct seq_operations vmalloc_op = {
2753 2753
2754static int vmalloc_open(struct inode *inode, struct file *file) 2754static int vmalloc_open(struct inode *inode, struct file *file)
2755{ 2755{
2756 if (IS_ENABLED(CONFIG_NUMA)) 2756 return seq_open_private(file, &vmalloc_op,
2757 return seq_open_private(file, &vmalloc_op,
2758 nr_node_ids * sizeof(unsigned int)); 2757 nr_node_ids * sizeof(unsigned int));
2759 else
2760 return seq_open(file, &vmalloc_op);
2761} 2758}
2762 2759
2763static const struct file_operations proc_vmalloc_operations = { 2760static const struct file_operations proc_vmalloc_operations = {
@@ -2769,7 +2766,11 @@ static const struct file_operations proc_vmalloc_operations = {
2769 2766
2770static int __init proc_vmalloc_init(void) 2767static int __init proc_vmalloc_init(void)
2771{ 2768{
2772 proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); 2769 if (IS_ENABLED(CONFIG_NUMA))
2770 proc_create("vmallocinfo", S_IRUSR, NULL,
2771 &proc_vmalloc_operations);
2772 else
2773 proc_create_seq("vmallocinfo", S_IRUSR, NULL, &vmalloc_op);
2773 return 0; 2774 return 0;
2774} 2775}
2775module_init(proc_vmalloc_init); 2776module_init(proc_vmalloc_init);