diff options
author | Javier González <javier@javigon.com> | 2018-06-01 15:04:21 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-06-01 07:43:53 -0600 |
commit | e13f421ba81b970f0952b2911bfc34aa9db5197f (patch) | |
tree | abc8a6765111b2c8382586f682725e98011b6cd7 /drivers/lightnvm | |
parent | b6730dd4a954ef5a421fe11cbaa02dafe55fcd49 (diff) | |
download | linux-e13f421ba81b970f0952b2911bfc34aa9db5197f.tar.bz2 |
lightnvm: pblk: remove unnecessary indirection
Call nvm_submit_io directly and remove an unnecessary indirection on the
read path.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/pblk-read.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c index 5adfc4739cfd..38f89a84ce5e 100644 --- a/drivers/lightnvm/pblk-read.c +++ b/drivers/lightnvm/pblk-read.c @@ -102,16 +102,6 @@ next: #endif } -static int pblk_submit_read_io(struct pblk *pblk, struct nvm_rq *rqd) -{ - int err; - - err = pblk_submit_io(pblk, rqd); - if (err) - return NVM_IO_ERR; - - return NVM_IO_OK; -} static void pblk_read_check_seq(struct pblk *pblk, struct nvm_rq *rqd, sector_t blba) @@ -485,9 +475,9 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio) rqd->bio = int_bio; r_ctx->private = bio; - ret = pblk_submit_read_io(pblk, rqd); - if (ret) { + if (pblk_submit_io(pblk, rqd)) { pr_err("pblk: read IO submission failed\n"); + ret = NVM_IO_ERR; if (int_bio) bio_put(int_bio); goto fail_end_io; |