Blob Blame History Raw
From 43a521238aca0e24d50add1db125a61bda2a3527 Mon Sep 17 00:00:00 2001
From: Lidong Zhong <lzhong@suse.com>
Date: Tue, 23 Jan 2018 23:06:12 +0800
Subject: [PATCH] md-cluster: choose correct label when clustered layout is not
 supported
Git-commit: 43a521238aca0e24d50add1db125a61bda2a3527
Patch-mainline: v4.16-rc4
References: bsc#1093023

r10conf is already successfully allocated before checking the layout

Signed-off-by: Lidong Zhong <lzhong@suse.com>
Reviewed-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Signed-off-by: Coly Li <colyli@suse.de>

---
 drivers/md/raid10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 9e9441fde8b3..93fa947fef22 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3784,7 +3784,7 @@ static int raid10_run(struct mddev *mddev)
 		if (fc > 1 || fo > 0) {
 			pr_err("only near layout is supported by clustered"
 				" raid10\n");
-			goto out;
+			goto out_free_conf;
 		}
 	}
 
-- 
2.16.3