Skip to content

Commit 3325322

Browse files
hreineckeidryomov
authored andcommitted
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 <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 24604f7 commit 3325322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/rbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7143,7 +7143,7 @@ static ssize_t do_rbd_add(struct bus_type *bus,
71437143
if (rc)
71447144
goto err_out_image_lock;
71457145

7146-
add_disk(rbd_dev->disk);
7146+
device_add_disk(&rbd_dev->dev, rbd_dev->disk, NULL);
71477147
/* see rbd_init_disk() */
71487148
blk_put_queue(rbd_dev->disk->queue);
71497149

0 commit comments

Comments
 (0)