From: Heinz Mauelshagen <heinzm@xxxxxxxxxx> Signed-off-by: heinzm <heinzm@xxxxxxxxxx> --- drivers/md/raid10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 510000de0886..60c9fba59d9f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3259,8 +3259,8 @@ static void raid10_set_cluster_sync_high(struct r10conf *conf) /* * At least use a 32M window to align with raid1's resync window */ - window_size = (CLUSTER_RESYNC_WINDOW_SECTORS > window_size) ? - CLUSTER_RESYNC_WINDOW_SECTORS : window_size; + window_size = (window_size < CLUSTER_RESYNC_WINDOW_SECTORS) ? + CLUSTER_RESYNC_WINDOW_SECTORS : window_size; conf->cluster_sync_high = conf->cluster_sync_low + window_size; } -- 2.39.2