From: NeilBrown Date: Fri, 8 May 2015 08:19:39 +0000 (+1000) Subject: md/raid5: fix allocation of 'scribble' array. X-Git-Tag: omap-for-v4.2/soc-pt1-take2~36^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=738a273806ee0568369c9bb19ef3b102f54beef4;p=pandora-kernel.git md/raid5: fix allocation of 'scribble' array. As the new 'scribble' array is sized based on chunk size, we need to make sure the size matches the largest of 'old' and 'new' chunk sizes when the array is undergoing reshape. We also potentially need to resize it even when not resizing the stripe cache, as chunk size can change without changing number of devices. So move the 'resize' code into a separate function, and consider old and new sizes when allocating. Signed-off-by: NeilBrown Fixes: 46d5b785621a ("raid5: use flex_array for scribble data") --- Reading git-diff-tree failed