lightnvm: do not free unused metadata on rrpc
authorJavier González <javier@cnexlabs.com>
Fri, 6 May 2016 18:03:11 +0000 (20:03 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 6 May 2016 18:51:10 +0000 (12:51 -0600)
rrpc does not save any metadata on a given request. Thus, do not attempt
to free the metadata dma region.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/rrpc.c

index c7fef71f4276683b2d51d0d2e8e3905e94e1a3ec..ffcfee6684ba21bb51940661a5f972b42492f19a 100644 (file)
@@ -711,8 +711,6 @@ static void rrpc_end_io(struct nvm_rq *rqd)
 
        if (npages > 1)
                nvm_dev_dma_free(rrpc->dev, rqd->ppa_list, rqd->dma_ppa_list);
-       if (rqd->metadata)
-               nvm_dev_dma_free(rrpc->dev, rqd->metadata, rqd->dma_metadata);
 
        mempool_free(rqd, rrpc->rq_pool);
 }