aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 9e1d2684ce93..5bca02842d07 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -144,33 +144,6 @@ static const struct file_operations proc_slabinfo_operations = {
144 .llseek = seq_lseek, 144 .llseek = seq_lseek,
145 .release = seq_release, 145 .release = seq_release,
146}; 146};
147
148#ifdef CONFIG_DEBUG_SLAB_LEAK
149extern const struct seq_operations slabstats_op;
150static int slabstats_open(struct inode *inode, struct file *file)
151{
152 unsigned long *n = kzalloc(PAGE_SIZE, GFP_KERNEL);
153 int ret = -ENOMEM;
154 if (n) {
155 ret = seq_open(file, &slabstats_op);
156 if (!ret) {
157 struct seq_file *m = file->private_data;
158 *n = PAGE_SIZE / (2 * sizeof(unsigned long));
159 m->private = n;
160 n = NULL;
161 }
162 kfree(n);
163 }
164 return ret;
165}
166
167static const struct file_operations proc_slabstats_operations = {
168 .open = slabstats_open,
169 .read = seq_read,
170 .llseek = seq_lseek,
171 .release = seq_release_private,
172};
173#endif
174#endif 147#endif
175 148
176#ifdef CONFIG_MMU 149#ifdef CONFIG_MMU
@@ -338,9 +311,6 @@ void __init proc_misc_init(void)
338 /* And now for trickier ones */ 311 /* And now for trickier ones */
339#ifdef CONFIG_SLABINFO 312#ifdef CONFIG_SLABINFO
340 proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations); 313 proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations);
341#ifdef CONFIG_DEBUG_SLAB_LEAK
342 proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations);
343#endif
344#endif 314#endif
345#ifdef CONFIG_MMU 315#ifdef CONFIG_MMU
346 proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); 316 proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);