Message ID | 20190502233332.28720-6-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/8] block: move the BIO_NO_PAGE_REF check into bio_release_pages | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff --git a/fs/block_dev.c b/fs/block_dev.c index 8abc6570d29f..a59ebea9d125 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); bio_put(bio); } }
Use bio_release_pages instead of duplicating it. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/block_dev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)