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 <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
mwilck@arcor.de 2013-10-25 12:07:33 +02:00 committed by NeilBrown
parent dacf3dc5d4
commit dc9e279c13
1 changed files with 1 additions and 6 deletions

View File

@ -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