aboutsummaryrefslogtreecommitdiffstats
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r--mm/kmemleak.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 9a085d525bbc..17dd883198ae 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -2097,6 +2097,11 @@ static int __init kmemleak_late_init(void)
2097 2097
2098 kmemleak_initialized = 1; 2098 kmemleak_initialized = 1;
2099 2099
2100 dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
2101 &kmemleak_fops);
2102 if (!dentry)
2103 pr_warn("Failed to create the debugfs kmemleak file\n");
2104
2100 if (kmemleak_error) { 2105 if (kmemleak_error) {
2101 /* 2106 /*
2102 * Some error occurred and kmemleak was disabled. There is a 2107 * Some error occurred and kmemleak was disabled. There is a
@@ -2108,10 +2113,6 @@ static int __init kmemleak_late_init(void)
2108 return -ENOMEM; 2113 return -ENOMEM;
2109 } 2114 }
2110 2115
2111 dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
2112 &kmemleak_fops);
2113 if (!dentry)
2114 pr_warn("Failed to create the debugfs kmemleak file\n");
2115 mutex_lock(&scan_mutex); 2116 mutex_lock(&scan_mutex);
2116 start_scan_thread(); 2117 start_scan_thread();
2117 mutex_unlock(&scan_mutex); 2118 mutex_unlock(&scan_mutex);