diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-10-10 19:26:40 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-10-10 19:26:40 +0200 |
commit | 24a403340d70aad3667b3ee0f9a7aa5c0a5193a0 (patch) | |
tree | 0fefe5ab75e033e959f95baccf94dcd9de6e6725 /block/genhd.c | |
parent | Merge tag 'ucount-rlimits-cleanups-for-v5.19' of git://git.kernel.org/pub/scm... (diff) | |
parent | block: fix leaking minors of hidden disks (diff) | |
download | linux-24a403340d70aad3667b3ee0f9a7aa5c0a5193a0.tar.xz linux-24a403340d70aad3667b3ee0f9a7aa5c0a5193a0.zip |
Merge branch 'for-6.1/block' into block-6.1
Merge in later fixes.
* for-6.1/block:
block: fix leaking minors of hidden disks
block: avoid sign extend problem with default queue flags mask
blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
block: Remove the repeat word 'can'
MAINTAINERS: Update SED-Opal Maintainers
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c index 514395361d7c..17b33c62423d 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -507,6 +507,13 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk, */ dev_set_uevent_suppress(ddev, 0); disk_uevent(disk, KOBJ_ADD); + } else { + /* + * Even if the block_device for a hidden gendisk is not + * registered, it needs to have a valid bd_dev so that the + * freeing of the dynamic major works. + */ + disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor); } disk_update_readahead(disk); |