Re: [PATCH v2 1/2] mpt3sas: Free memory pools before retrying to allocate with different value.

From: Tomas Henzl
Date: Thu Feb 18 2016 - 07:54:41 EST


On 18.2.2016 09:39, Suganath Prabu Subramani wrote:
> From: Suganath prabu Subramani <suganath-prabu.subramani@xxxxxxxxxxxxx>
>
> Deallocate resources before reallocating of the same in retry_allocation
> path of _base_allocate_memory_pools()
>
> Signed-off-by: Suganath prabu Subramani <suganath-prabu.subramani@xxxxxxxxxxxxx>
> Signed-off-by: Chaitra P B <chaitra.basappa@xxxxxxxxxxxx>
> ---
> drivers/scsi/mpt3sas/mpt3sas_base.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index afdb13a..5bbbbf2 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -3414,6 +3414,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)
> goto out;
> retry_sz = 64;
> ioc->hba_queue_depth -= retry_sz;
> + _base_release_memory_pools(ioc);
> goto retry_allocation;
> }
>

Reviewed-by: Tomas Henzl <thenzl@xxxxxxxxxx>