X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=lib%2Fiommu-helper.c;h=a816f3a806258c8ea08ac787c8eee9841d3204bc;hb=04d348ae3f0aea6523bc3b0688b5fc90c1c60d0e;hp=c27e269210c426a9066dea48ecce05577ab35eed;hpb=02171b4a7c5b555d08c3321332e0c45776518276;p=sfrench%2Fcifs-2.6.git diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c index c27e269210c4..a816f3a80625 100644 --- a/lib/iommu-helper.c +++ b/lib/iommu-helper.c @@ -29,8 +29,7 @@ again: index = bitmap_find_next_zero_area(map, size, start, nr, align_mask); if (index < size) { if (iommu_is_span_boundary(index, nr, shift, boundary_size)) { - /* we could do more effectively */ - start = index + 1; + start = ALIGN(shift + index, boundary_size) - shift; goto again; } bitmap_set(map, index, nr);