diff options
author | Guoqing Jiang <jgq516@gmail.com> | 2019-09-03 11:41:03 +0200 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2019-09-03 14:52:38 -0700 |
commit | b0f01ecf293c49d841abbf8b55c4b717936ab11e (patch) | |
tree | 65b19f0c9add1c4abad4cca08e8cc26d890ec967 | |
parent | 07f1a6850c5d5a65c917c3165692b5179ac4cb6b (diff) |
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>
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 88e56ee98976..da6a86e28318 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -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; |