Commit cc146267 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Song Liu

md/raid5: remove an incorrect assert in in_chunk_boundary

Now that the original bdev is stored in the bio this assert is incorrect
and will trigger for any partitioned raid5 device.
Reported-by: default avatarFlorian Dazinger <spam02@dazinger.net>
Tested-by: default avatarFlorian Dazinger <spam02@dazinger.net>
Cc: stable@vger.kernel.org # 5.12
Fixes: 309dca30 ("block: store a block_device pointer in struct bio"),
Reviewed-by: default avatarGuoqing Jiang <jiangguoqing@kylinos.cn>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSong Liu <song@kernel.org>
parent bc6a3851
...@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio) ...@@ -5311,8 +5311,6 @@ static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)
unsigned int chunk_sectors; unsigned int chunk_sectors;
unsigned int bio_sectors = bio_sectors(bio); unsigned int bio_sectors = bio_sectors(bio);
WARN_ON_ONCE(bio->bi_bdev->bd_partno);
chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors); chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors);
return chunk_sectors >= return chunk_sectors >=
((sector & (chunk_sectors - 1)) + bio_sectors); ((sector & (chunk_sectors - 1)) + bio_sectors);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment