On 06/08/17 04:46, Hannes Reinecke wrote:
>       if (lo->lo_offset != info->lo_offset ||
> -         lo->lo_sizelimit != info->lo_sizelimit)
> -             if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit)) {
> +         lo->lo_sizelimit != info->lo_sizelimit ||
> +         lo->lo_flags != lo_flags ||
> +         ((lo->lo_flags & LO_FLAGS_BLOCKSIZE) &&
> +          lo->lo_logical_blocksize != LO_INFO_BLOCKSIZE(info))) {
> +             if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit,
> +                                  LO_INFO_BLOCKSIZE(info)))
>                       err = -EFBIG;
>                       goto exit;
>               }

Hello Hannes and Jens,

gcc reports the following for the above code:

drivers/block/loop.c:1149:3: warning: this 'if' clause does not guard...
[-Wmisleading-indentation]

Please review this code. Have the braces perhaps been misplaced?

Thanks,

Bart.

Reply via email to