On Mon, Oct 10, 2022 at 10:02:18AM +0200, Daniel Wagner wrote: > Doesn't give me the same consistent result as with Keith's version: That's because it is broken.. Try this version: diff --git a/block/genhd.c b/block/genhd.c index 514395361d7c5..2296ad422523a 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -507,6 +507,8 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk, */ dev_set_uevent_suppress(ddev, 0); disk_uevent(disk, KOBJ_ADD); + } else { + disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor); } disk_update_readahead(disk);