-/**
- * map_id_down_base - Find idmap via binary search in static extent array.
- * Can only be called if number of mappings is equal or less than
- * UID_GID_MAP_MAX_BASE_EXTENTS.
- */
-static struct uid_gid_extent *
-map_id_down_base(unsigned extents, struct uid_gid_map *map, u32 id)
-{
- unsigned idx;
- u32 first, last;
-
- /* Find the matching extent */
- for (idx = 0; idx < extents; idx++) {
- first = map->extent[idx].first;
- last = first + map->extent[idx].count - 1;
- if (id >= first && id <= last)
- return &map->extent[idx];
- }
- return NULL;
-}
-