aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index bc43c7838778..63a5f502da08 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2751,24 +2751,12 @@ static const struct seq_operations vmalloc_op = {
2751 .show = s_show, 2751 .show = s_show,
2752}; 2752};
2753 2753
2754static int vmalloc_open(struct inode *inode, struct file *file)
2755{
2756 return seq_open_private(file, &vmalloc_op,
2757 nr_node_ids * sizeof(unsigned int));
2758}
2759
2760static const struct file_operations proc_vmalloc_operations = {
2761 .open = vmalloc_open,
2762 .read = seq_read,
2763 .llseek = seq_lseek,
2764 .release = seq_release_private,
2765};
2766
2767static int __init proc_vmalloc_init(void) 2754static int __init proc_vmalloc_init(void)
2768{ 2755{
2769 if (IS_ENABLED(CONFIG_NUMA)) 2756 if (IS_ENABLED(CONFIG_NUMA))
2770 proc_create("vmallocinfo", S_IRUSR, NULL, 2757 proc_create_seq_private("vmallocinfo", S_IRUSR, NULL,
2771 &proc_vmalloc_operations); 2758 &vmalloc_op,
2759 nr_node_ids * sizeof(unsigned int), NULL);
2772 else 2760 else
2773 proc_create_seq("vmallocinfo", S_IRUSR, NULL, &vmalloc_op); 2761 proc_create_seq("vmallocinfo", S_IRUSR, NULL, &vmalloc_op);
2774 return 0; 2762 return 0;