]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: make sure to_read and to_write never go negative.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:30 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:30 +0000 (12:37 +1000)
commit998534eaa0b02dc6446ebb07ac14b9e3e9bb3ee2
tree978640f4d588d2ae360e5ad68e9d7bf29d507fb7
parent3b8fe7dd30900d357a0603e8e97d5278c846db54
md/raid5: make sure to_read and to_write never go negative.

to_read and to_write are part of the result of analysing
a stripe before handling it.
Their use is to avoid some loops and tests if the values are
known to be zero.  Thus it is not a problem if they are a
little bit larger than they should be.

So decrementing them in handle_failed_stripe serves little value, and
due to races it could cause some loops to be skipped incorrectly.

So remove those decrements.

Reported-by: "Jianpeng Ma" <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c