1
0
Fork 0

md/raid5: use bio_end_sector to calculate last_sector

Use the common way to get last_sector.

Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
alistair/sunxi64-5.4-dsi
Guoqing Jiang 2019-09-03 11:41:03 +02:00 committed by Song Liu
parent 07f1a6850c
commit b0f01ecf29
1 changed files with 1 additions and 1 deletions

View File

@ -5499,7 +5499,7 @@ static void make_discard_request(struct mddev *mddev, struct bio *bi)
return;
logical_sector = bi->bi_iter.bi_sector & ~((sector_t)STRIPE_SECTORS-1);
last_sector = bi->bi_iter.bi_sector + (bi->bi_iter.bi_size>>9);
last_sector = bio_end_sector(bi);
bi->bi_next = NULL;