summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-01-23 13:44:33 +0100
committerIlya Dryomov <idryomov@gmail.com>2020-01-27 16:53:40 +0100
commit3325322f773bae68b20d8fa0e9e8ebb005271db5 (patch)
tree73223d36eda520317cd68c1e66939be8341680c6
parent24604f7e2bde5e6458812c3e9ee2a0d60c8c99fe (diff)
rbd: set the 'device' link in sysfs
The rbd driver already provides additional information in sysfs under /sys/bus/rbd, so we should set the 'device' link in the block device to reference this information. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--drivers/block/rbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 38dcb39051a7..405b66e09040 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -7143,7 +7143,7 @@ static ssize_t do_rbd_add(struct bus_type *bus,
if (rc)
goto err_out_image_lock;
- add_disk(rbd_dev->disk);
+ device_add_disk(&rbd_dev->dev, rbd_dev->disk, NULL);
/* see rbd_init_disk() */
blk_put_queue(rbd_dev->disk->queue);