1
linux/block/partitions
Li Lingfeng 7777f47f2e block: Move checking GENHD_FL_NO_PART to bdev_add_partition()
Commit 1a721de848 ("block: don't add or resize partition on the disk
with GENHD_FL_NO_PART") prevented all operations about partitions on disks
with GENHD_FL_NO_PART in blkpg_do_ioctl() since they are meaningless.
However, it changed error code in some scenarios. So move checking
GENHD_FL_NO_PART to bdev_add_partition() to eliminate impact.

Fixes: 1a721de848 ("block: don't add or resize partition on the disk with GENHD_FL_NO_PART")
Reported-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
Closes: https://lore.kernel.org/all/CAOYeF9VsmqKMcQjo1k6YkGNujwN-nzfxY17N3F-CMikE1tYp+w@mail.gmail.com/
Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240118130401.792757-1-lilingfeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-01-22 09:51:29 -07:00
..
acorn.c
aix.c
amiga.c block/partition: fix signedness issue for Amiga partitions 2023-07-05 16:34:56 -06:00
atari.c
atari.h
check.h
cmdline.c block: use strscpy() to instead of strncpy() 2023-08-22 18:07:50 -06:00
core.c block: Move checking GENHD_FL_NO_PART to bdev_add_partition() 2024-01-22 09:51:29 -07:00
efi.c
efi.h
ibm.c partitions/ibm: Introduce defines for magic string length values 2023-10-04 08:04:08 -06:00
karma.c
Kconfig
ldm.c
ldm.h
mac.c
mac.h
Makefile
msdos.c
osf.c
sgi.c
sun.c
sysv68.c
ultrix.c