aboutsummaryrefslogtreecommitdiff
path: root/block/blk-pm.h
diff options
context:
space:
mode:
authorGravatar Li Lingfeng <lilingfeng3@huawei.com> 2024-03-05 11:21:32 +0800
committerGravatar Jens Axboe <axboe@kernel.dk> 2024-03-06 08:32:06 -0700
commitb9355185d2aeef11f6e365dd98def82212637936 (patch)
tree7d1c573e26956192cdf7e2b12ad3273a95cfafdd /block/blk-pm.h
parentblock: prevent division by zero in blk_rq_stat_sum() (diff)
downloadlinux-b9355185d2aeef11f6e365dd98def82212637936.tar.gz
linux-b9355185d2aeef11f6e365dd98def82212637936.tar.bz2
linux-b9355185d2aeef11f6e365dd98def82212637936.zip
block: move capacity validation to blkpg_do_ioctl()
Commit 6d4e80db4ebe ("block: add capacity validation in bdev_add_partition()") add check of partition's start and end sectors to prevent exceeding the size of the disk when adding partitions. However, there is still no check for resizing partitions now. Move the check to blkpg_do_ioctl() to cover resizing partitions. Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240305032132.548958-1-lilingfeng@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-pm.h')
0 files changed, 0 insertions, 0 deletions