|
@@ -2097,6 +2097,11 @@ static int __init kmemleak_late_init(void)
|
|
|
|
|
|
kmemleak_initialized = 1;
|
|
|
|
|
|
+ dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
|
|
|
+ &kmemleak_fops);
|
|
|
+ if (!dentry)
|
|
|
+ pr_warn("Failed to create the debugfs kmemleak file\n");
|
|
|
+
|
|
|
if (kmemleak_error) {
|
|
|
/*
|
|
|
* Some error occurred and kmemleak was disabled. There is a
|
|
@@ -2108,10 +2113,6 @@ static int __init kmemleak_late_init(void)
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
|
- dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
|
|
|
- &kmemleak_fops);
|
|
|
- if (!dentry)
|
|
|
- pr_warn("Failed to create the debugfs kmemleak file\n");
|
|
|
mutex_lock(&scan_mutex);
|
|
|
start_scan_thread();
|
|
|
mutex_unlock(&scan_mutex);
|