Re: [PATCH v3 3/6] blktrace: move blktrace debugfs creation to helper function
From: Bart Van Assche <bvanassche@acm.org>
Date: 2020-05-02 00:25:12
Also in:
linux-fsdevel, linux-mm, lkml
From: Bart Van Assche <bvanassche@acm.org>
Date: 2020-05-02 00:25:12
Also in:
linux-fsdevel, linux-mm, lkml
On 2020-04-29 00:46, Luis Chamberlain wrote:
+static struct dentry *blk_trace_debugfs_dir(struct blk_user_trace_setup *buts,
+ struct blk_trace *bt)
+{
+ struct dentry *dir = NULL;
+
+ dir = debugfs_lookup(buts->name, blk_debugfs_root);
+ if (!dir)
+ bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);
+
+ return dir;
+}Initializing 'dir' is not necessary since the first statement overwrites 'dir'. Anyway: Reviewed-by: Bart Van Assche <bvanassche@acm.org>