diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-26 15:49:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-29 09:47:31 -0600 |
commit | 57dfe3ce10e5cecfb3d073e90c0454f432a86873 (patch) | |
tree | a6e2767062c46641d5081bc863ea815c8c5e5ce6 /fs/block_dev.c | |
parent | 147a60538d91ddd431c970f83527b3365d72eefc (diff) | |
download | lwn-57dfe3ce10e5cecfb3d073e90c0454f432a86873.tar.gz lwn-57dfe3ce10e5cecfb3d073e90c0454f432a86873.zip |
block_dev: use bio_release_pages in blkdev_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>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 749f5984425d..a6572a811880 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -335,13 +335,7 @@ static void blkdev_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); } } |