[Ocfs2-devel] [PATCH] ocfs2: The goto is not useful in the function ocfs2_reserve_cluster_bitmap_bits, so remove it.
Changwei Ge
ge.changwei at h3c.com
Wed Nov 15 16:42:09 PST 2017
Hi Zhonghua,
On 2017/11/15 20:04, Guozhonghua wrote:
> The goto is not useful anymore, removed from the context.
Perhaps we can make this change-log more clear like:
The bail declare is not necessary any more, so trim it. If code path
falls into error branch, ocfs2_reserve_cluster_bitmap_bits will return
in next following step, too.
And this title can be changed into 'ocfs2: clean up unnecessary bail
declare'
I suppose after that this patch will be neater.
Can you resend this patch?
Moreover, I think we should also CC this patch to OCFS2 maintainers.
Thanks,
Changwei
>
> Signed-off-by: guozhonghua <guozhonghua at h3c.com>
> ---
> fs/ocfs2/suballoc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
> index 71f22c8..9f0b95a 100644
> --- a/fs/ocfs2/suballoc.c
> +++ b/fs/ocfs2/suballoc.c
> @@ -1147,12 +1147,9 @@ int ocfs2_reserve_cluster_bitmap_bits(struct ocfs2_super *osb,
> GLOBAL_BITMAP_SYSTEM_INODE,
> OCFS2_INVALID_SLOT, NULL,
> ALLOC_NEW_GROUP);
> - if (status < 0 && status != -ENOSPC) {
> + if (status < 0 && status != -ENOSPC)
> mlog_errno(status);
> - goto bail;
> - }
>
> -bail:
> return status;
> }
>
>
More information about the Ocfs2-devel
mailing list