diff options
author | NeilBrown <neilb@suse.com> | 2015-08-03 17:09:57 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-08-03 17:10:56 +1000 |
commit | 49895bcc7e566ba455eb2996607d6fbd3447ce16 (patch) | |
tree | e62f0eb74f454df5f6e219eba25ca965a591abd2 /drivers/md/md.c | |
parent | b6878d9e03043695dbf3fa1caa6dfc09db225b16 (diff) | |
download | linux-49895bcc7e566ba455eb2996607d6fbd3447ce16.tar.bz2 |
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 <tomas.papan@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md.c')
0 files changed, 0 insertions, 0 deletions