[PATCH 06/11] drbd_transport_rdma: put kref in error path

Philipp Reisner philipp.reisner at linbit.com
Fri Jun 28 14:12:37 CEST 2024


Hello Dongsheng,

It looks plausible, but still, please provide a description.

On Mon, Jun 24, 2024 at 7:52 AM zhengbing.huang
<zhengbing.huang at easystack.cn> wrote:
>
> From: Dongsheng Yang <dongsheng.yang at easystack.cn>
>
> Signed-off-by: Dongsheng Yang <dongsheng.yang at easystack.cn>
> ---
>  drbd/drbd_transport_rdma.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drbd/drbd_transport_rdma.c b/drbd/drbd_transport_rdma.c
> index 9a6d15b78..c7adc87e3 100644
> --- a/drbd/drbd_transport_rdma.c
> +++ b/drbd/drbd_transport_rdma.c
> @@ -1157,6 +1157,7 @@ static void dtr_cma_connect_work_fn(struct work_struct *work)
>         kref_get(&cm->kref); /* for the path->cm pointer */
>         err = dtr_path_prepare(path, cm, true);
>         if (err) {
> +               kref_put(&cm->kref, dtr_destroy_cm);
>                 tr_err(transport, "dtr_path_prepare() = %d\n", err);
>                 goto out;
>         }
> --
> 2.27.0
>


More information about the drbd-dev mailing list