block: loop: mark bvec as ITER_BVEC_FLAG_NO_REF
commit81ba6abd2bcd2812974bd3a4c43d1d032acfa751
authorMing Lei <ming.lei@redhat.com>
Thu, 28 Mar 2019 03:05:31 +0000 (28 11:05 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Apr 2019 18:11:48 +0000 (1 12:11 -0600)
tree2223771a69cbddbc0a640244f75aabb5cfef6f8d
parentf6970f83ef79503cb24ca8324e5cfa1188674f85
block: loop: mark bvec as ITER_BVEC_FLAG_NO_REF

loop is one block device, for any bio submitted to this device,
the upper layer does guarantee that pages added to loop's bio won't
go away when the bio is in-flight.

So mark loop's bvec as ITER_BVEC_FLAG_NO_REF then get_page/put_page
can be saved for serving loop's IO.

Cc: linux-fsdevel@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c