block: move the BIO_NO_PAGE_REF check into bio_release_pages
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2019 13:49:20 +0000 (15:49 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 29 Jun 2019 15:47:31 +0000 (09:47 -0600)
commitb2d0d99135ad145667765cbd27f148c1a4cd50d1
treeba7a32c0d97092ac72397f1517d1c29dded717c6
parent5f2ab0c1c896764ef3b2d01d9e40d138c2bfd791
block: move the BIO_NO_PAGE_REF check into bio_release_pages

Move the BIO_NO_PAGE_REF check into bio_release_pages instead of
duplicating it in both callers.

Also make the function available outside of bio.c so that we can
reuse it in other direct I/O implementations.

Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/bio.h