]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Kill.c
Fix RAID metadata check
[thirdparty/mdadm.git] / Kill.c
diff --git a/Kill.c b/Kill.c
index 6e426c0e3c6661f5d5eaf2963a963f1c5c2bd954..f2fdb856c44b4a9a904063deb0d4d89fdcb4d821 100644 (file)
--- a/Kill.c
+++ b/Kill.c
@@ -63,7 +63,8 @@ int Kill(char *dev, struct supertype *st, int force, int verbose, int noexcl)
        rv = st->ss->load_super(st, fd, dev);
        if (rv == 0 || (force && rv >= 2)) {
                st->ss->free_super(st);
-               st->ss->init_super(st, NULL, 0, "", NULL, NULL);
+               st->ss->init_super(st, NULL, 0, "", NULL, NULL,
+                                  INVALID_SECTORS);
                if (st->ss->store_super(st, fd)) {
                        if (verbose >= 0)
                                pr_err("Could not zero superblock on %s\n",
@@ -106,14 +107,14 @@ int Kill_subarray(char *dev, char *subarray, int verbose)
                goto free_super;
        }
 
-       if (is_subarray_active(subarray, st->devname)) {
+       if (is_subarray_active(subarray, st->devnm)) {
                if (verbose >= 0)
                        pr_err("Subarray-%s still active, aborting\n",
                               subarray);
                goto free_super;
        }
 
-       if (mdmon_running(st->devnum))
+       if (mdmon_running(st->devnm))
                st->update_tail = &st->updates;
 
        /* ok we've found our victim, drop the axe */