diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/blktrace.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index ee7a8bb8b1e8..95f89faca73e 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -426,11 +426,15 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
426 | 426 | ||
427 | ret = -ENOENT; | 427 | ret = -ENOENT; |
428 | 428 | ||
429 | mutex_lock(&blk_tree_mutex); | ||
429 | if (!blk_tree_root) { | 430 | if (!blk_tree_root) { |
430 | blk_tree_root = debugfs_create_dir("block", NULL); | 431 | blk_tree_root = debugfs_create_dir("block", NULL); |
431 | if (!blk_tree_root) | 432 | if (!blk_tree_root) { |
433 | mutex_unlock(&blk_tree_mutex); | ||
432 | goto err; | 434 | goto err; |
435 | } | ||
433 | } | 436 | } |
437 | mutex_unlock(&blk_tree_mutex); | ||
434 | 438 | ||
435 | dir = debugfs_create_dir(buts->name, blk_tree_root); | 439 | dir = debugfs_create_dir(buts->name, blk_tree_root); |
436 | 440 | ||