]> 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)
commit6ad8e806cb93e66e47917b7f07ed34b959a09e0e
treec4e1f885673cd7ee7e08a0eba38a68e7badf6cca
parentf63d88c9779f6cbf9ab8f923173d9dc2bcf1a443
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: e392bfc1d3ad94b1774445ed8d2d5cc893c0d378
cc: stable@vger.kernel.org (v3.13+)
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c