axmap: fix bug in axmap_find_first_free()
authorJens Axboe <axboe@kernel.dk>
Wed, 23 Jan 2013 17:15:05 +0000 (10:15 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Jan 2013 17:15:05 +0000 (10:15 -0700)
commit55348b420e618b1c5c50106261437fe948ef2132
treefb679bac054bdfecb80c4bf0c992dd9cf537ff2e
parentbcd5abfa9f230bbe4365dad1289fdea1f5509f74
axmap: fix bug in axmap_find_first_free()

If the map is completely full, we could return an invalid value
for the first free bit. So check if we actually found a match,
return failure if we didn't.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/axmap.c