No functional change, just use an existing helper.
Unified · Split
| @@ -695,10 +695,7 @@ found: · 694 unmodified lines | ||
| 695 | 695 | /* |
| 696 | 696 | * Update the indices to avoid searching in the next round. |
| 697 | 697 | */ |
| 698 | − if (index + nslots < mem->area_nslabs) | |
| 699 | − area->index = index + nslots; | |
| 700 | − else | |
| 701 | − area->index = 0; | |
| 698 | + area->index = wrap_area_index(mem, index + nslots); | |
| 702 | 699 | area->used += nslots; |
| 703 | 700 | spin_unlock_irqrestore(&area->lock, flags); |
| 704 | 701 | return slot_index; |