diff options
author | Guoqing Jiang <jgq516@gmail.com> | 2019-09-03 11:41:03 +0200 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2019-09-03 23:52:38 +0200 |
commit | b0f01ecf293c49d841abbf8b55c4b717936ab11e (patch) | |
tree | 65b19f0c9add1c4abad4cca08e8cc26d890ec967 /drivers/md/raid5.c | |
parent | md/raid1: fail run raid1 array when active disk less than one (diff) | |
download | linux-b0f01ecf293c49d841abbf8b55c4b717936ab11e.tar.xz linux-b0f01ecf293c49d841abbf8b55c4b717936ab11e.zip |
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>
Diffstat (limited to '')
-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; |