]> git.ipfire.org Git - thirdparty/linux.git/commit
badblocks: fix the using of MAX_BADBLOCKS
authorLi Nan <linan122@huawei.com>
Thu, 27 Feb 2025 07:55:01 +0000 (15:55 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Mar 2025 15:03:28 +0000 (08:03 -0700)
commit37446680dfbfbba7cbedd680047182f70a0b857b
tree7817fc55a8532bfec49623227bdb53f9d56882a9
parent7f500f0a59b1d7345a05ec4ae703babf34b7e470
badblocks: fix the using of MAX_BADBLOCKS

The number of badblocks cannot exceed MAX_BADBLOCKS, but it should be
allowed to equal MAX_BADBLOCKS.

Fixes: aa511ff8218b ("badblocks: switch to the improved badblock handling code")
Fixes: c3c6a86e9efc ("badblocks: add helper routines for badblock ranges handling")
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Acked-by: Coly Li <colyli@kernel.org>
Link: https://lore.kernel.org/r/20250227075507.151331-7-zhengqixing@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/badblocks.c