Change the semantics to return id > max on failure

This commit is contained in:
Denis Kenzior 2010-01-07 14:06:45 -06:00
parent 0ed5c70010
commit 4e621f3ad3
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ unsigned int idmap_alloc(struct idmap *idmap)
bit = find_next_zero_bit(idmap->bits, idmap->size, 0);
if (bit >= idmap->size)
return 0;
return idmap->max + 1;
offset = bit / BITS_PER_LONG;
idmap->bits[offset] |= 1 << (bit % BITS_PER_LONG);