diff options
author | Wenwei Tao <ww.tao0320@gmail.com> | 2016-01-12 09:49:15 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-01-12 18:21:15 +0300 |
commit | 3cd485b1f8e25a6534eb4c542e7eba1b944fbaaf (patch) | |
tree | 57095214abdef867218f39434ed3ca72870d3263 /drivers/lightnvm/gennvm.c | |
parent | 168309855a7d1e16db751e9c647119fe2d2dc878 (diff) | |
download | linux-3cd485b1f8e25a6534eb4c542e7eba1b944fbaaf.tar.xz |
lightnvm: fix bio submission issue
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>
Diffstat (limited to 'drivers/lightnvm/gennvm.c')
-rw-r--r-- | drivers/lightnvm/gennvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index a54b339951a3..62c6f4d11f24 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c @@ -345,7 +345,7 @@ static void gennvm_generic_to_addr_mode(struct nvm_dev *dev, struct nvm_rq *rqd) static int gennvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd) { if (!dev->ops->submit_io) - return 0; + return -ENODEV; /* Convert address space */ gennvm_generic_to_addr_mode(dev, rqd); |