From: Heinz Mauelshagen Date: Thu, 13 Jul 2017 15:33:22 +0000 (+0200) Subject: dm raid: remove WARN_ON() in raid10_md_layout_to_format() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbac1e06a415c0658dd328ba9c5f640c2d97be3a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dm raid: remove WARN_ON() in raid10_md_layout_to_format() Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 2e10c2f13a34..b409015c6909 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -564,9 +564,10 @@ static const char *raid10_md_layout_to_format(int layout) if (__raid10_near_copies(layout) > 1) return "near"; - WARN_ON(__raid10_far_copies(layout) < 2); + if (__raid10_far_copies(layout) > 1) + return "far"; - return "far"; + return "unknown"; } /* Return md raid10 algorithm for @name */