md/raid1: update next_resync under resync_lock.
authorNeilBrown <neilb@suse.de>
Wed, 10 Sep 2014 06:01:24 +0000 (16:01 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 22 Sep 2014 01:26:01 +0000 (11:26 +1000)
commitc2fd4c94deedb89ac1746c4a53219be499372c06
treec0d082333a84c70b3eda3e68232eea88bbc52f39
parent235549605eb7f1c5a37cef8b09d12e6d412c5cd6
md/raid1: update next_resync under resync_lock.

raise_barrier() uses next_resync as part of its calculations, so it
really should be updated first, instead of afterwards.

next_resync is always used under resync_lock so update it under
resync lock to, just before it is used.  That is safest.

This could cause normal IO and resync IO to interact badly so
it suitable for -stable.

Fixes: 79ef3a8aa1cb1523cc231c9a90a278333c21f761
cc: stable@vger.kernel.org (v3.13+)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c
This page took 0.026466 seconds and 5 git commands to generate.