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 | |
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')
-rw-r--r-- | block/bio.c | 2 | ||||
-rw-r--r-- | block/blk-wbt.c | 3 | ||||
-rw-r--r-- | block/genhd.c | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/block/bio.c b/block/bio.c index 7cb7d2ff139b..6c470a50a36d 100644 --- a/block/bio.c +++ b/block/bio.c @@ -567,7 +567,7 @@ EXPORT_SYMBOL(bio_alloc_bioset); * be reused by calling bio_uninit() before calling bio_init() again. * * Note that unlike bio_alloc() or bio_alloc_bioset() allocations from this - * function are not backed by a mempool can can fail. Do not use this function + * function are not backed by a mempool can fail. Do not use this function * for allocations in the file system I/O path. * * Returns: Pointer to new bio on success, NULL on failure. diff --git a/block/blk-wbt.c b/block/blk-wbt.c index 246467926253..c293e08b301f 100644 --- a/block/blk-wbt.c +++ b/block/blk-wbt.c @@ -841,12 +841,11 @@ int wbt_init(struct request_queue *q) rwb->last_comp = rwb->last_issue = jiffies; rwb->win_nsec = RWB_WINDOW_NSEC; rwb->enable_state = WBT_STATE_ON_DEFAULT; - rwb->wc = 1; + rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags); rwb->rq_depth.default_depth = RWB_DEF_DEPTH; rwb->min_lat_nsec = wbt_default_latency_nsec(q); wbt_queue_depth_changed(&rwb->rqos); - wbt_set_write_cache(q, test_bit(QUEUE_FLAG_WC, &q->queue_flags)); /* * Assign rwb and add the stats callback. 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); |