[1/3] lightnvm: do not free unused metadata on rrpc
diff mbox

Message ID 1461778138-23116-1-git-send-email-javier@javigon.com
State New
Headers show

Commit Message

=?UTF-8?q?Javier=20Gonz=C3=A1lez?= April 27, 2016, 5:28 p.m. UTC
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>
---
 drivers/lightnvm/rrpc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Matias Bjorling April 27, 2016, 6:56 p.m. UTC | #1
On 04/27/2016 07:28 PM, Javier González wrote:
> 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>
> ---
>   drivers/lightnvm/rrpc.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index c7fef71..ffcfee6 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -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);
>   }
>

Thanks. Applied for 4.7.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matias Bjørling April 28, 2016, 1:41 p.m. UTC | #2
On 04/27/2016 07:28 PM, Javier González wrote:
> 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>
> ---
>   drivers/lightnvm/rrpc.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index c7fef71..ffcfee6 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -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);
>   }
>

Thanks Javier. Applied for 4.7.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c7fef71..ffcfee6 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -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);
 }