diff options
author | Javier González <jg@lightnvm.io> | 2017-06-26 05:57:21 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-26 18:27:39 -0400 |
commit | f680f19aa6dbbbabf499250d49f18a426b14f1c2 (patch) | |
tree | 78dbe23eb94ec0680ed1f5ece1bec7916d124a23 /drivers/lightnvm/pblk-core.c | |
parent | f9c101523da75cd483b95f04c21242bb83960d93 (diff) |
lightnvm: pblk: simplify meta. memory allocation
smeta size will always be suitable for a kmalloc allocation. Simplify
the code and leave the vmalloc fallback only for emeta, where the pblk
configuration has an impact.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 29565f89a85e..b5f7f3f19105 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c | |||
@@ -665,7 +665,8 @@ next_rq: | |||
665 | } | 665 | } |
666 | reinit_completion(&wait); | 666 | reinit_completion(&wait); |
667 | 667 | ||
668 | bio_put(bio); | 668 | if (likely(pblk->l_mg.emeta_alloc_type == PBLK_VMALLOC_META)) |
669 | bio_put(bio); | ||
669 | 670 | ||
670 | if (rqd.error) { | 671 | if (rqd.error) { |
671 | if (dir == WRITE) | 672 | if (dir == WRITE) |