diff --git a/[refs] b/[refs] index 48ddfba68829..5310b60e2dbf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a845099b20e81fb678521f034bbdcd69208da4e +refs/heads/master: 589777eab7360894b7ca1c4ba9d252e03b51225b diff --git a/trunk/lib/idr.c b/trunk/lib/idr.c index 81fc430602ee..c5be889de449 100644 --- a/trunk/lib/idr.c +++ b/trunk/lib/idr.c @@ -175,7 +175,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id) * Add a new layer to the top of the tree if the requested * id is larger than the currently allocated space. */ - while ((layers < MAX_LEVEL) && (id >= (1 << (layers*IDR_BITS)))) { + while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) { layers++; if (!p->count) continue;