]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: proper error handling for pblk_bio_add_pages
authorIgor Konopko <igor.j.konopko@intel.com>
Fri, 1 Jun 2018 14:41:08 +0000 (16:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Jun 2018 15:02:53 +0000 (09:02 -0600)
commitdd2fe93527593defd488798b8e5a875c663017b3
treef801d30c4a6fe2b2dc0a3cdb419e495fab2f3f85
parent53cf2c5543fcd8d6ab653912d027c883a87b90a8
lightnvm: proper error handling for pblk_bio_add_pages

Currently in case of error caused by bio_pc_add_page in
pblk_bio_add_pages two issues occur when calling from
pblk_rb_read_to_bio(). First one is in pblk_bio_free_pages, since we
are trying to free pages not allocated from our mempool. Second one
is the warn from dma_pool_free, that we are trying to free NULL
pointer dma.

This commit fix both issues.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-core.c