Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: edbe83a ("md/raid5: allow the stripe_cache to grow and shrink.") Cc: [email protected] (4.1 - please release with 2d5b569) Reported-by: Tomas Papan <[email protected]> Signed-off-by: NeilBrown <[email protected]>
- Loading branch information