On Tue, Apr 23, 2019 at 03:15:49PM +0800, Ming Lei wrote:
> +     if (bip->bip_vcnt) {
> +             iv = bip->bip_vec + bip->bip_vcnt - 1;
>  
> +             if (bvec_gap_to_prev(bio->bi_disk->queue, iv, offset))
> +                     return 0;
>  
> +             if (page_is_mergeable(iv, page, len, offset, false)) {
> +                     iv->bv_len += len;
> +                     goto done;
> +             }
> +     }
> +
> +     iv = bip->bip_vec + bip->bip_vcnt;
>       iv->bv_page = page;
>       iv->bv_len = len;
>       iv->bv_offset = offset;
>       bip->bip_vcnt++;
> -
> + done:
>       return len;

Just do an early return instead of the goto..

Otherwise this looks fine:

Reviewed-by: Christoph Hellwig <[email protected]>

Reply via email to