From: NeilBrown Date: Fri, 17 Jul 2015 02:06:02 +0000 (+1000) Subject: md: be careful when testing resync_max against curr_resync_completed. X-Git-Tag: omap-for-v4.3/fixes-rc1~84^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5e19d906a658f27fa858b09a95d9551b1a69bd0;p=pandora-kernel.git md: be careful when testing resync_max against curr_resync_completed. While it generally shouldn't happen, it is not impossible for curr_resync_completed to exceed resync_max. This can particularly happen when reshaping RAID5 - the current status isn't copied to curr_resync_completed promptly, so when it is, it can exceed resync_max. This happens when the reshape is 'frozen', resync_max is set low, and reshape is re-enabled. Taking a difference between two unsigned numbers is always dangerous anyway, so add a test to behave correctly if curr_resync_completed > resync_max Signed-off-by: NeilBrown --- Reading git-diff-tree failed