From: NeilBrown Date: Mon, 3 Aug 2015 07:09:57 +0000 (+1000) Subject: md/raid5: don't let shrink_slab shrink too far. X-Git-Tag: omap-for-v4.3/fixes-merge-window~137^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49895bcc7e566ba455eb2996607d6fbd3447ce16;p=pandora-kernel.git md/raid5: don't let shrink_slab shrink too far. I have a report of drop_one_stripe() called from raid5_cache_scan() apparently finding ->max_nr_stripes == 0. This should not be allowed. So add a test to keep max_nr_stripes above min_nr_stripes. Also use a 'mask' rather than a 'mod' in drop_one_stripe to ensure 'hash' is valid even if max_nr_stripes does reach zero. Fixes: edbe83ab4c27 ("md/raid5: allow the stripe_cache to grow and shrink.") Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b665) Reported-by: Tomas Papan Signed-off-by: NeilBrown --- Reading git-diff-tree failed