diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-10-19 22:24:14 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-20 08:08:07 -0600 |
commit | c809084ab033a8d4ee404e2ac3c5d3dc80cb65f7 (patch) | |
tree | 67fa1fdc8cdd25c8f5ba1d59ee02b5b0ae6038c7 /block/bio.c | |
parent | 1497a51a3287959a9eb74e0432203ba3e2dc7347 (diff) | |
download | linux-stable-c809084ab033a8d4ee404e2ac3c5d3dc80cb65f7.tar.gz linux-stable-c809084ab033a8d4ee404e2ac3c5d3dc80cb65f7.tar.bz2 linux-stable-c809084ab033a8d4ee404e2ac3c5d3dc80cb65f7.zip |
block: inline a part of bio_release_pages()
Inline BIO_NO_PAGE_REF check of bio_release_pages() to avoid function
call.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/bio.c b/block/bio.c index 4f397ba47db5..46a87c72d2b4 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1033,21 +1033,18 @@ int bio_add_page(struct bio *bio, struct page *page, } EXPORT_SYMBOL(bio_add_page); -void bio_release_pages(struct bio *bio, bool mark_dirty) +void __bio_release_pages(struct bio *bio, bool mark_dirty) { struct bvec_iter_all iter_all; struct bio_vec *bvec; - if (bio_flagged(bio, BIO_NO_PAGE_REF)) - return; - bio_for_each_segment_all(bvec, bio, iter_all) { if (mark_dirty && !PageCompound(bvec->bv_page)) set_page_dirty_lock(bvec->bv_page); put_page(bvec->bv_page); } } -EXPORT_SYMBOL_GPL(bio_release_pages); +EXPORT_SYMBOL_GPL(__bio_release_pages); static void __bio_iov_bvec_set(struct bio *bio, struct iov_iter *iter) { |