From: Eric Sandeen Date: Thu, 31 Jan 2013 00:55:01 +0000 (+0000) Subject: btrfs: ensure we don't overrun devices_info[] in __btrfs_alloc_chunk X-Git-Tag: v3.9-rc1~17^2~29^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=063d006fa06fbf73fab370921120380333a33e85;p=pandora-kernel.git 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: Eric Sandeen Signed-off-by: Josef Bacik --- Reading git-diff-tree failed