tracing: Make tracing work when debugfs is not configured in
[cascardo/linux.git] / kernel / trace / trace.c
index 2198a63..08af79c 100644 (file)
@@ -6847,7 +6847,9 @@ struct dentry *tracing_init_dentry(void)
        if (tr->dir)
                return NULL;
 
-       if (WARN_ON(!debugfs_initialized()))
+       if (WARN_ON(!tracefs_initialized()) ||
+               (IS_ENABLED(CONFIG_DEBUG_FS) &&
+                WARN_ON(!debugfs_initialized())))
                return ERR_PTR(-ENODEV);
 
        /*