[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMGffEn79RE=JbTPR0AzW+3EZO0MwemwTLwkc-LTnK8f06dKWA@mail.gmail.com>
Date: Fri, 18 Sep 2020 10:18:26 +0200
From: Jinpu Wang <jinpu.wang@...ud.ionos.com>
To: Gioh Kim <gi-oh.kim@...ud.ionos.com>
Cc: Danil Kipnis <danil.kipnis@...ud.ionos.com>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block/rnbd: send_msg_close if any error occurs after send_msg_open
On Fri, Sep 18, 2020 at 9:24 AM Gioh Kim <gi-oh.kim@...ud.ionos.com> wrote:
>
> From: Gioh Kim <gi-oh.kim@...ud.ionos.com>
>
> After send_msg_open is done, send_msg_close should be done
> if any error occurs and it is necessary to recover
> what has been done.
>
> Signed-off-by: Gioh Kim <gi-oh.kim@...ud.ionos.com>
Looks good to me!
Thanks!
Acked-by: Jack Wang <jinpu.wang@...ud.ionos.com>
> ---
> drivers/block/rnbd/rnbd-clt.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
> index cc6a4e2587ae..4a24603d5224 100644
> --- a/drivers/block/rnbd/rnbd-clt.c
> +++ b/drivers/block/rnbd/rnbd-clt.c
> @@ -1520,7 +1520,7 @@ struct rnbd_clt_dev *rnbd_clt_map_device(const char *sessname,
> "map_device: Failed to configure device, err: %d\n",
> ret);
> mutex_unlock(&dev->lock);
> - goto del_dev;
> + goto send_close;
> }
>
> rnbd_clt_info(dev,
> @@ -1539,6 +1539,8 @@ struct rnbd_clt_dev *rnbd_clt_map_device(const char *sessname,
>
> return dev;
>
> +send_close:
> + send_msg_close(dev, dev->device_id, WAIT);
> del_dev:
> delete_dev(dev);
> put_dev:
> --
> 2.20.1
>
Powered by blists - more mailing lists