]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: clean up request counts properly in close_sync()
authorNeilBrown <neilb@suse.de>
Thu, 4 Sep 2014 06:30:38 +0000 (16:30 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 22 Sep 2014 01:26:01 +0000 (11:26 +1000)
commit10636540b63b4c40cb3ad9d29ae89ca7766f46ba
treec4e1f885673cd7ee7e08a0eba38a68e7badf6cca
parentb825499525020e42ea6feed8e4b127813ce0b0a3
md/raid1: clean up request counts properly in close_sync()

If there are outstanding writes when close_sync is called,
the change to ->start_next_window might cause them to
decrement the wrong counter when they complete.  Fix this
by merging the two counters into the one that will be decremented.

Having an incorrect value in a counter can cause raise_barrier()
to hangs, so this is suitable for -stable.

Fixes: b718760feda718421e51ffddbcd4207d488838f2
cc: stable@vger.kernel.org (v3.13+)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c