On 15/03/16 15:35, Andrew Cooper wrote:

>  /* calculate required space for number of longs needed to hold nr_bits */
>  static inline int bitmap_size(int nr_bits)
>  {
> -    int nr_long, nr_bytes;
> -    nr_long = (nr_bits + BITS_PER_LONG - 1) >> ORDER_LONG;
> -    nr_bytes = nr_long * sizeof(unsigned long);
> -    return nr_bytes;
> +    return (nr_bits + 7) >> 8;

Turns out this is a bug and should be / 8 rather than >> 8.

I have it fixed locally, but won't send a v4 quite yet.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to