block: optionally mark pages dirty in bio_release_pages
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2019 13:49:21 +0000 (15:49 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 29 Jun 2019 15:47:31 +0000 (09:47 -0600)
commitd241a95f3514a5eb544dfd8d9d141ffd1c89b707
tree4e0545aab26f747bbe890cc9756dff3d276a2de6
parentb2d0d99135ad145667765cbd27f148c1a4cd50d1
block: optionally mark pages dirty in bio_release_pages

A lot of callers of bio_release_pages also want to mark the released
pages as dirty.  Add a mark_dirty parameter to avoid a second
relatively expensive bio_for_each_segment_all loop.

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