aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 7db1b9bab492..1bbbbd9776ad 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -613,6 +613,9 @@ static char * const migratetype_names[MIGRATE_TYPES] = {
613 "Reclaimable", 613 "Reclaimable",
614 "Movable", 614 "Movable",
615 "Reserve", 615 "Reserve",
616#ifdef CONFIG_CMA
617 "CMA",
618#endif
616 "Isolate", 619 "Isolate",
617}; 620};
618 621
@@ -1220,7 +1223,6 @@ module_init(setup_vmstat)
1220#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION) 1223#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)
1221#include <linux/debugfs.h> 1224#include <linux/debugfs.h>
1222 1225
1223static struct dentry *extfrag_debug_root;
1224 1226
1225/* 1227/*
1226 * Return an index indicating how much of the available free memory is 1228 * Return an index indicating how much of the available free memory is
@@ -1358,19 +1360,24 @@ static const struct file_operations extfrag_file_ops = {
1358 1360
1359static int __init extfrag_debug_init(void) 1361static int __init extfrag_debug_init(void)
1360{ 1362{
1363 struct dentry *extfrag_debug_root;
1364
1361 extfrag_debug_root = debugfs_create_dir("extfrag", NULL); 1365 extfrag_debug_root = debugfs_create_dir("extfrag", NULL);
1362 if (!extfrag_debug_root) 1366 if (!extfrag_debug_root)
1363 return -ENOMEM; 1367 return -ENOMEM;
1364 1368
1365 if (!debugfs_create_file("unusable_index", 0444, 1369 if (!debugfs_create_file("unusable_index", 0444,
1366 extfrag_debug_root, NULL, &unusable_file_ops)) 1370 extfrag_debug_root, NULL, &unusable_file_ops))
1367 return -ENOMEM; 1371 goto fail;
1368 1372
1369 if (!debugfs_create_file("extfrag_index", 0444, 1373 if (!debugfs_create_file("extfrag_index", 0444,
1370 extfrag_debug_root, NULL, &extfrag_file_ops)) 1374 extfrag_debug_root, NULL, &extfrag_file_ops))
1371 return -ENOMEM; 1375 goto fail;
1372 1376
1373 return 0; 1377 return 0;
1378fail:
1379 debugfs_remove_recursive(extfrag_debug_root);
1380 return -ENOMEM;
1374} 1381}
1375 1382
1376module_init(extfrag_debug_init); 1383module_init(extfrag_debug_init);