On 2017/8/26 8:10, Jaegeuk Kim wrote:
> We should avoid i==j, otherwise we always assign 0~5 segments.
> 
> Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org>

Reviewed-by: Chao Yu <yuch...@huawei.com>

> ---
>  mkfs/f2fs_format.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
> index b379e80..219c2a7 100644
> --- a/mkfs/f2fs_format.c
> +++ b/mkfs/f2fs_format.c
> @@ -123,7 +123,7 @@ static void verify_cur_segs(void)
>  
>       for (i = 0; i < NR_CURSEG_TYPE; i++) {
>               for (j = 0; j < NR_CURSEG_TYPE; j++)
> -                     if (c.cur_seg[i] == c.cur_seg[j])
> +                     if (i != j && c.cur_seg[i] == c.cur_seg[j])
>                               break;
>       }
>  
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to