linux-stable/block
Li Lingfeng 4e3fc83581 block: don't add or resize partition on the disk with GENHD_FL_NO_PART
commit 1a721de848 upstream.

Commit a33df75c63 ("block: use an xarray for disk->part_tbl") remove
disk_expand_part_tbl() in add_partition(), which means all kinds of
devices will support extended dynamic `dev_t`.
However, some devices with GENHD_FL_NO_PART are not expected to add or
resize partition.
Fix this by adding check of GENHD_FL_NO_PART before add or resize
partition.

Fixes: a33df75c63 ("block: use an xarray for disk->part_tbl")
Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230831075900.1725842-1-lilingfeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:41 +02:00
..
partitions block/partition: fix signedness issue for Amiga partitions 2023-07-19 16:37:03 +02:00
Kconfig for-6.4/block-2023-04-21 2023-04-26 12:52:58 -07:00
Kconfig.iosched block: Default to use cgroup support for BFQ 2023-01-30 09:42:42 -07:00
Makefile blk-mq-rdma: remove queue mapping helper for rdma devices 2023-04-13 08:59:05 +02:00
badblocks.c block/badblocks: Remove redundant assignments 2022-04-23 07:15:26 -06:00
bdev.c block: sync part's ->bd_has_submit_bio with disk's 2023-04-25 07:36:02 -06:00
bfq-cgroup.c blkcg: Restructure blkg_conf_prep() and friends 2023-04-13 06:46:49 -06:00
bfq-iosched.c block, bfq: Fix division by zero error on zero wsum 2023-04-16 13:01:43 -06:00
bfq-iosched.h block, bfq: remove BFQ_WEIGHT_LEGACY_DFL 2023-04-06 16:17:32 -06:00
bfq-wf2q.c block, bfq: inject I/O to underutilized actuators 2023-01-29 15:18:33 -07:00
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-02-16 11:05:41 -07:00
bio.c ext4: Convert ext4_bio_write_page() to use a folio 2023-04-06 13:39:50 -04:00
blk-cgroup-fc-appid.c cgroup: Homogenize cgroup_get_from_id() return value 2022-08-26 10:57:41 -10:00
blk-cgroup-rwstat.c Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" 2023-02-14 14:24:09 -07:00
blk-cgroup-rwstat.h block: Use the new blk_opf_t type 2022-07-14 12:14:30 -06:00
blk-cgroup.c blk-cgroup: Fix NULL deref caused by blkg_policy_data being installed before init 2023-09-13 09:48:19 +02:00
blk-cgroup.h for-6.4/block-2023-04-21 2023-04-26 12:52:58 -07:00
blk-core.c blk-mq: Fix stall due to recursive flush plug 2023-08-03 10:25:41 +02:00
blk-crypto-fallback.c blk-crypto: dynamically allocate fallback profile 2023-08-23 17:32:53 +02:00
blk-crypto-internal.h blk-crypto: remove blk_crypto_insert_cloned_request() 2023-03-16 09:35:09 -06:00
blk-crypto-profile.c blk-crypto: use dynamic lock class for blk_crypto_profile::lock 2023-07-23 13:53:39 +02:00
blk-crypto-sysfs.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-crypto.c blk-crypto: make blk_crypto_evict_key() more robust 2023-03-16 09:35:09 -06:00
blk-flush.c blk-mq: fix the blk_mq_add_to_requeue_list call in blk_kick_flush 2023-04-16 13:01:43 -06:00
blk-ia-ranges.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-integrity.c blk-integrity: register sysfs attributes on struct device 2023-04-26 18:22:50 -06:00
blk-ioc.c block: fix default IO priority handling again 2022-06-27 06:29:12 -06:00
blk-iocost.c blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost 2023-07-19 16:35:08 +02:00
blk-iolatency.c blk-iolatency: Make initialization lazy 2023-04-13 06:46:49 -06:00
blk-ioprio.c blk-cgroup: pass a gendisk to pd_alloc_fn 2023-02-03 08:20:05 -07:00
blk-ioprio.h blk-ioprio: pass a gendisk to blk_ioprio_init and blk_ioprio_exit 2022-09-26 19:09:31 -06:00
blk-lib.c blk-lib: fix blkdev_issue_secure_erase 2022-09-15 00:25:17 -06:00
blk-map.c block: fix bio-cache for passthru IO 2023-05-23 11:11:29 -06:00
blk-merge.c blk-mq: release crypto keyslot before reporting I/O complete 2023-03-16 09:35:09 -06:00
blk-mq-cpumap.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-mq-debugfs-zoned.c block: move zone related fields to struct gendisk 2022-07-06 06:46:26 -06:00
blk-mq-debugfs.c blk-mq: fix potential io hang by wrong 'wake_batch' 2023-07-19 16:35:09 +02:00
blk-mq-debugfs.h block: remove per-disk debugfs files in blk_unregister_queue 2022-06-17 07:31:05 -06:00
blk-mq-pci.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-mq-sched.c blk-mq: cleanup __blk_mq_sched_dispatch_requests 2023-04-13 06:57:18 -06:00
blk-mq-sched.h blk-mq: move blk_mq_sched_insert_request to blk-mq.c 2023-04-13 06:52:29 -06:00
blk-mq-sysfs.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-mq-tag.c blk-mq: fix potential io hang by wrong 'wake_batch' 2023-07-19 16:35:09 +02:00
blk-mq-virtio.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-mq.c blk-mq: Fix stall due to recursive flush plug 2023-08-03 10:25:41 +02:00
blk-mq.h blk-mq: fix potential io hang by wrong 'wake_batch' 2023-07-19 16:35:09 +02:00
blk-pm.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-pm.h
blk-rq-qos.c block/rq_qos: protect rq_qos apis with a new lock 2023-07-19 16:35:07 +02:00
blk-rq-qos.h blk-iolatency: s/blkcg_rq_qos/iolat_rq_qos/ 2023-04-13 06:46:49 -06:00
blk-settings.c block: don't allow enabling a cache on devices that don't support it 2023-09-13 09:48:13 +02:00
blk-stat.c blk-mq: include <linux/blk-mq.h> in block/blk-mq.h 2023-04-13 06:52:29 -06:00
blk-stat.h block: make queue stat accounting a reference 2021-12-14 17:23:05 -07:00
blk-sysfs.c block: don't allow enabling a cache on devices that don't support it 2023-09-13 09:48:13 +02:00
blk-throttle.c blk-throttle: Fix io statistics for cgroup v1 2023-07-19 16:36:40 +02:00
blk-throttle.h blk-throttle: Fix io statistics for cgroup v1 2023-07-19 16:36:40 +02:00
blk-timeout.c
blk-wbt.c block/rq_qos: protect rq_qos apis with a new lock 2023-07-19 16:35:07 +02:00
blk-wbt.h blk-wbt: move private information from blk-wbt.h to blk-wbt.c 2023-02-03 08:20:05 -07:00
blk-zoned.c block: remove more NULL checks after bdev_get_queue() 2023-02-21 09:23:22 -07:00
blk.h blk-integrity: register sysfs attributes on struct device 2023-04-26 18:22:50 -06:00
bounce.c block: change the blk_queue_bounce calling convention 2022-08-02 17:22:54 -06:00
bsg-lib.c blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue 2022-10-25 08:25:10 -06:00
bsg.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
disk-events.c block: increment diskseq on all media change events 2023-07-19 16:36:22 +02:00
elevator.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
elevator.h blk-mq: pass a flags argument to elevator_type->insert_requests 2023-04-13 06:52:30 -06:00
fops.c block: Deny writable memory mapping if block is read-only 2023-05-19 20:17:10 -06:00
genhd.c block: fix blktrace debugfs entries leakage 2023-07-19 16:35:11 +02:00
holder.c block: don't allow a disk link holder to itself 2022-11-16 15:19:56 -07:00
ioctl.c block: don't add or resize partition on the disk with GENHD_FL_NO_PART 2023-09-13 09:48:41 +02:00
ioprio.c block: Fix handling of tasks without ioprio in ioprio_get(2) 2022-06-27 06:29:12 -06:00
kyber-iosched.c blk-mq: pass a flags argument to elevator_type->insert_requests 2023-04-13 06:52:30 -06:00
mq-deadline.c block/mq-deadline: use correct way to throttling write requests 2023-09-13 09:48:17 +02:00
opal_proto.h sed-opal: allow user authority to get locking range attributes. 2023-04-05 07:46:25 -06:00
sed-opal.c sed-opal: geometry feature reporting command 2023-04-19 14:07:13 -06:00
t10-pi.c block: add pi for extended integrity 2022-03-07 12:48:35 -07:00