On Fri, Oct 26, 2018 at 09:44:15AM +0200, Christoph Hellwig wrote:
> >             if (req_sects > UINT_MAX >> 9)
> > -                   req_sects = UINT_MAX >> 9;
> > +                   req_sects = (UINT_MAX >> 9) & ~bs_mask;
> 
> Given that we have this same thing duplicated in write zeroes
> what about a documented helper?

IMO, using UINT_MAX & bs_mask is better because it is self-explanatory
in the context.

If we introduce one helper, it may not be easy to find a better
name than UINT_MAX.

thanks,
Ming

Reply via email to