From dc9e279c136cedc63fb020f132ec49428e2541ac Mon Sep 17 00:00:00 2001 From: "mwilck@arcor.de" Date: Fri, 25 Oct 2013 12:07:33 +0200 Subject: [PATCH] DDF: __write_init_super_ddf: just use seq number of active header It's not necessary to check for 0xffffffff, which is a valid sequential number. Signed-off-by: Martin Wilck Signed-off-by: NeilBrown --- super-ddf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/super-ddf.c b/super-ddf.c index 32dd0237..85af345b 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -2483,12 +2483,7 @@ static int __write_init_super_ddf(struct supertype *st) } memset(null_aligned, 0xff, NULL_CONF_SZ); - if (ddf->primary.seq != 0xffffffff) - seq = __cpu_to_be32(__be32_to_cpu(ddf->primary.seq)+1); - else if (ddf->secondary.seq != 0xffffffff) - seq = __cpu_to_be32(__be32_to_cpu(ddf->secondary.seq)+1); - else - seq = __cpu_to_be32(1); + seq = ddf->active->seq + 1; /* try to write updated metadata, * if we catch a failure move on to the next disk -- 2.47.2