[Ocfs2-tools-devel] [PATCH] ocfs2_hb_ctl: Honor errors from ocfs2_fill_heartbeat_desc().

Sunil Mushran sunil.mushran at oracle.com
Wed Dec 3 13:44:11 PST 2008


Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>


Joel Becker wrote:
> When I added the cluster descriptor to ocfs2_hb_ctl, I lost the error
> return from calling ocfs2_fill_heartbeat_desc() in get_desc().  Jump out
> of the function when the error happens.
>
> This is bugzilla #1053.
>
> Signed-off-by: Joel Becker <joel.becker at oracle.com>
> ---
>  ocfs2_hb_ctl/ocfs2_hb_ctl.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/ocfs2_hb_ctl/ocfs2_hb_ctl.c b/ocfs2_hb_ctl/ocfs2_hb_ctl.c
> index 27c10f0..3fe45ed 100644
> --- a/ocfs2_hb_ctl/ocfs2_hb_ctl.c
> +++ b/ocfs2_hb_ctl/ocfs2_hb_ctl.c
> @@ -139,6 +139,7 @@ static errcode_t get_desc(const char *dev)
>  	} else {
>  		region_desc->r_name = NULL;
>  		region_desc->r_device_name = NULL;
> +		goto out_close;
>  	}
>  
>  	err = ocfs2_fill_cluster_desc(fs, cluster_desc);
> @@ -160,6 +161,7 @@ static errcode_t get_desc(const char *dev)
>  		cluster_desc->c_cluster = NULL;
>  	}
>  
> +out_close:
>  	ocfs2_close(fs);
>  
>  out:
>   




More information about the Ocfs2-tools-devel mailing list