From 8d3107683c2799241303916db0cb2a9b7091daa6 Mon Sep 17 00:00:00 2001 From: Sasikantha babu Date: Tue, 29 May 2012 15:06:22 -0700 Subject: [PATCH] --- yaml --- r: 308835 b: refs/heads/master c: bde8bd8a1d5242589ddcaef8e017b48b207c4729 h: refs/heads/master i: 308833: 135700a1a4367e0d8b2ae7340f14d84f89638318 308831: 30911fa6897d65a6ead1a9bf075a5ec31fbcb624 v: v3 --- [refs] | 2 +- trunk/mm/vmstat.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 499083d37983..4a9f206ba977 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7edc8b0ac16cbaed7cb4ea4c6b95ce98d2997e84 +refs/heads/master: bde8bd8a1d5242589ddcaef8e017b48b207c4729 diff --git a/trunk/mm/vmstat.c b/trunk/mm/vmstat.c index 0dad31dc1618..1bbbbd9776ad 100644 --- a/trunk/mm/vmstat.c +++ b/trunk/mm/vmstat.c @@ -1223,7 +1223,6 @@ module_init(setup_vmstat) #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION) #include -static struct dentry *extfrag_debug_root; /* * Return an index indicating how much of the available free memory is @@ -1361,19 +1360,24 @@ static const struct file_operations extfrag_file_ops = { static int __init extfrag_debug_init(void) { + struct dentry *extfrag_debug_root; + extfrag_debug_root = debugfs_create_dir("extfrag", NULL); if (!extfrag_debug_root) return -ENOMEM; if (!debugfs_create_file("unusable_index", 0444, extfrag_debug_root, NULL, &unusable_file_ops)) - return -ENOMEM; + goto fail; if (!debugfs_create_file("extfrag_index", 0444, extfrag_debug_root, NULL, &extfrag_file_ops)) - return -ENOMEM; + goto fail; return 0; +fail: + debugfs_remove_recursive(extfrag_debug_root); + return -ENOMEM; } module_init(extfrag_debug_init);