> -----Original Message-----
> From: linux-btrfs-ow...@vger.kernel.org 
> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Qu Wenruo
> Sent: Thursday, July 05, 2018 3:38 PM
> To: linux-btrfs@vger.kernel.org
> Subject: [PATCH 4/4] btrfs-progs: check/original: Don't overwrite return 
> value when we failed to repair
> 
> In check_inode_recs(), for repair mode we always reset @ret to 0.
> It makes no sense and later we check@ret to determine if the repair is
> successful.
> 
> Fix it by removing the offending overwrite.
> 
> Signed-off-by: Qu Wenruo <w...@suse.com>
> ---
>  check/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/check/main.c b/check/main.c
> index 2b5abb2d025b..08476968aaba 100644
> --- a/check/main.c
> +++ b/check/main.c
> @@ -2764,7 +2764,6 @@ static int check_inode_recs(struct btrfs_root *root,
>                               free_inode_rec(rec);
>                               continue;
>                       }
> -                     ret = 0;
>               }
> 
>               if (!(repair && ret == 0))
> --

Reviewed-by: Gu Jinxiang <g...@cn.fujitsu.com>


> 2.18.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



N�Р骒r��y����b�X�肚�v�^�)藓{.n�+�伐�{�n谶�)��骅w*jg�报�����茛j/�赇z罐���2���ㄨ��&�)摺�a囤���G���h��j:+v���w��佶

Reply via email to