Skip to content
Commit 063d006f authored by Eric Sandeen's avatar Eric Sandeen Committed by Josef Bacik
Browse files

btrfs: ensure we don't overrun devices_info[] in __btrfs_alloc_chunk



WARN_ON isn't enough, we need to stop the loop if for any reason
we would overrun the devices_info array.

I tried to track down the connection between the length of
the alloc_devices list and the rw_devices counter but
it wasn't immediately obvious, so be defensive about it.

Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent 1971e917
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment