From: Chris Mason Date: Fri, 20 Feb 2015 01:51:39 +0000 (-0800) Subject: Btrfs: fix allocation size calculations in alloc_btrfs_bio X-Git-Tag: fixes-v4.0-rc2~33^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e57cf21e9787c081db4db6afa02e6e70112ee410;p=pandora-kernel.git Btrfs: fix allocation size calculations in alloc_btrfs_bio Since commit 8e5cfb55d3f (Btrfs: Make raid_map array be inlined in btrfs_bio structure), the raid map array is allocated along with the btrfs bio in alloc_btrfs_bio. The calculation used to decide how much we need to allocate was using the wrong parameter passed into the allocation function. The passed in real_stripes will be zero if a target replace operation is not currently running. We want to use total_stripes instead. Signed-off-by: Chris Mason Reported-by: David Sterba Tested-by: David Sterba --- Reading git-diff-tree failed