md-cluster: fix wrong condition check in raid1_write_request
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 29 Sep 2017 01:16:43 +0000 (09:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:36 +0000 (10:10 +0100)
commit46788d19e137fc48d93f0a29eade2e02e05317f6
tree0c5397d6e36734191109fa88af13763837323d57
parent339aba679813ff1fabde362147919d3f6e536568
md-cluster: fix wrong condition check in raid1_write_request

[ Upstream commit 385f4d7f946b08f36f68b0a28e95a319925b6b62 ]

The check used here is to avoid conflict between write and
resync, however we used the wrong logic, it should be the
inverse of the checking inside "if".

Fixes: 589a1c4 ("Suspend writes in RAID1 if within range")
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid1.c