lightnvm: fix bio submission issue
authorWenwei Tao <ww.tao0320@gmail.com>
Tue, 12 Jan 2016 06:49:15 +0000 (07:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:39 +0000 (08:27 +0200)
commitcf48dc15f10a8524c37dd0a7f2821b3123d54744
tree3fc0fe09f6cdc39a5b430ed46bf9aba1ce7b4324
parentedf9459008c299d90abc5c7a045d167e5f46f68c
lightnvm: fix bio submission issue

[ Upstream commit 3cd485b1f8e25a6534eb4c542e7eba1b944fbaaf ]

Put bio when submission fails, since we get it
before submission. And return error when backend
device driver doesn't provide a submit_io method,
thus we can end IO properly.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/lightnvm/gennvm.c
drivers/lightnvm/rrpc.c