lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Wed, 10 Apr 2019 17:56:43 +0000 (19:56 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Apr 2019 18:17:01 +0000 (12:17 -0600)
commitb2b3a70cd9984fe39ed5aaa9ce596476051ce5de
tree2b9f5049115efb26211ed7b921eda20e0905852e
parenteb3afb75b57c28599af0dfa03a99579d410749e9
lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs

The introduction of multipage bio vectors broke pblk's partial read
logic due to it not being prepared for multipage bio vectors.

Use bio vector iterators instead of direct bio vector indexing.

Fixes: 07173c3ec276 ("block: enable multipage bvecs")
Reported-by: Klaus Jensen <klaus.jensen@cnexlabs.com>
Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Updated description.
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-read.c