summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-26 15:49:24 +0200
committerJens Axboe <axboe@kernel.dk>2019-06-29 09:47:31 -0600
commit147a60538d91ddd431c970f83527b3365d72eefc (patch)
tree071a34df53c3d85b774abd5e03cf6d62ec353f28
parent506e0798479ed54d48f063547b1b62d33b18d54c (diff)
iomap: use bio_release_pages in iomap_dio_bio_end_io
Use bio_release_pages instead of duplicating it. Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/iomap.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/iomap.c b/fs/iomap.c
index 23ef63fd1669..3798eaf789d7 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -1595,13 +1595,7 @@ static void iomap_dio_bio_end_io(struct bio *bio)
if (should_dirty) {
bio_check_pages_dirty(bio);
} else {
- if (!bio_flagged(bio, BIO_NO_PAGE_REF)) {
- struct bvec_iter_all iter_all;
- struct bio_vec *bvec;
-
- bio_for_each_segment_all(bvec, bio, iter_all)
- put_page(bvec->bv_page);
- }
+ bio_release_pages(bio, false);
bio_put(bio);
}
}