diff options
author | NeilBrown <neilb@suse.de> | 2011-11-01 03:30:44 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-11-01 03:30:44 +0100 |
commit | 88657e86d9c75d3ab68a03035fbc49366712558c (patch) | |
tree | 016816ab17dba89b7b3319b968fbaa0725c6f309 /Kill.c | |
parent | Remove duplicated code: search_mdstat and conf_match (diff) | |
download | mdadm-88657e86d9c75d3ab68a03035fbc49366712558c.tar.xz mdadm-88657e86d9c75d3ab68a03035fbc49366712558c.zip |
Kill: remove duplicate tests on 'force'.
We test 'force' twice with the second having not chance of
taking effect.
As a result a subsequent message - intended for use in the 'force'
case is never generated.
So remove the first test - it is unnecessary.
Reported-by: Jes.Sorensen@redhat.com
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Kill.c')
-rw-r--r-- | Kill.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -61,9 +61,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl) } st->ignore_hw_compat = 1; rv = st->ss->load_super(st, fd, dev); - if (force && rv >= 2) - rv = 0; /* ignore bad data in superblock */ - if (rv== 0 || (force && rv >= 2)) { + if (rv == 0 || (force && rv >= 2)) { st->ss->free_super(st); st->ss->init_super(st, NULL, 0, "", NULL, NULL); if (st->ss->store_super(st, fd)) { |