]> git.baikalelectronics.ru Git - kernel.git/commit
block: add a helper to free bio bounce buffer pages
authorChristoph Hellwig <hch@lst.de>
Sun, 18 Jan 2015 15:16:30 +0000 (16:16 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 5 Feb 2015 16:30:39 +0000 (09:30 -0700)
commit11088ccc11833b4287b6296fafcb892cc86ddcf3
tree572a04efee9750a118a43579fef0381dd9997461
parent07c8935505a436a27128936d4d699c71ea51b685
block: add a helper to free bio bounce buffer pages

The code sniplet to walk all bio_vecs and free their pages is opencoded in
way to many places, so factor it into a helper.  Also convert the slightly
more complex cases in bio_kern_endio and __bio_copy_iov where we break
the freeing from an existing loop into a separate one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio.c