raid10: increment write counter after bio is split
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Thu, 28 Jul 2016 08:28:25 +0000 (10:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2017 07:35:18 +0000 (09:35 +0200)
commit73dd1edf50a6bdf33046c2e4aa0b1ad4fef71a71
tree8cc7e4d7119c237d5e2922cf3f20cdd285ce893f
parent17503963206584333b674740ba75b5079ea7e196
raid10: increment write counter after bio is split

commit 9b622e2bbcf049c82e2550d35fb54ac205965f50 upstream.

md pending write counter must be incremented after bio is split,
otherwise it gets decremented too many times in end bio callback and
becomes negative.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid10.c