Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582496
| From | Ming Lei <tom.leiming@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/17] md: raid1/raid10: use bio_remove_last_page() |
| Date | 2017-02-16 12:50 +0100 |
| Message-ID | <tbsJr-5E4-1@gated-at.bofh.it> (permalink) |
| References | <tbsJr-5E4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
drivers/md/raid1.c | 3 +--
drivers/md/raid10.c | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 85f309836fd7..6e4e0b868ff2 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2824,8 +2824,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr,
if (bio->bi_end_io==NULL)
continue;
/* remove last page from this bio */
- bio->bi_vcnt--;
- bio->bi_iter.bi_size -= len;
+ bio_remove_last_page(bio);
bio_clear_flag(bio, BIO_SEG_VALID);
}
goto bio_full;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 063c43d83b72..aa37d4c7900a 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3447,8 +3447,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
bio2 && bio2 != bio;
bio2 = bio2->bi_next) {
/* remove last page from this bio */
- bio2->bi_vcnt--;
- bio2->bi_iter.bi_size -= len;
+ bio_remove_last_page(bio2);
bio_clear_flag(bio2, BIO_SEG_VALID);
}
goto bio_full;
@@ -4538,8 +4537,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
bio2 && bio2 != bio;
bio2 = bio2->bi_next) {
/* Remove last page from this bio */
- bio2->bi_vcnt--;
- bio2->bi_iter.bi_size -= len;
+ bio_remove_last_page(bio2);
bio_clear_flag(bio2, BIO_SEG_VALID);
}
goto bio_full;
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/17] md: raid1/raid10: use bio_remove_last_page() Ming Lei <tom.leiming@gmail.com> - 2017-02-16 12:50 +0100
csiph-web