summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-06-28 19:18:45 +0200
committerJens Axboe <axboe@kernel.dk>2022-06-28 11:32:42 -0600
commitcc5c516df028b221d94c65c47c5ae8d20f61b6f9 (patch)
tree1114eeab9f60729e53f9af2766760c31267649ac /block/genhd.c
parent8b9ab62662048a3274361c7e5f64037c2c133e2c (diff)
block: simplify blktrace sysfs attribute creation
Add the trace attributes to the default gendisk attributes, just like we already do for partitions. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220628171850.1313069-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c
index bf9be06af2c8..b1fb7e058b9c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1134,6 +1134,9 @@ static struct attribute_group disk_attr_group = {
static const struct attribute_group *disk_attr_groups[] = {
&disk_attr_group,
+#ifdef CONFIG_BLK_DEV_IO_TRACE
+ &blk_trace_attr_group,
+#endif
NULL
};