summaryrefslogtreecommitdiff
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-12-14 20:14:00 +1100
committerNeil Brown <neilb@suse.de>2007-12-14 20:14:00 +1100
commitdf37ffc0393b919ba5607bb48b2eaf2f9a1832d7 (patch)
treeda5119c602aa6e1c40248b5a9c8312aedceaeedb /Incremental.c
parent2faf1f5f635419a922cf0072c435a23a78b793a7 (diff)
downloadmdadm-df37ffc0393b919ba5607bb48b2eaf2f9a1832d7.tar.gz
Allow metadata handlers to free their own superblock.
As the metadata handler allocates the superblock, it should free it too. DDF will have a more complex 'superblock' which needs more complex freeing.
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Incremental.c b/Incremental.c
index 705c402..94ef47d 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -502,7 +502,7 @@ static void find_reject(int mdfd, struct supertype *st, struct sysarray *sra,
continue;
}
st->ss->getinfo_super(&info, super);
- free(super);
+ st->ss->free_super(super);
close(dfd);
if (info.disk.number != number ||
@@ -574,24 +574,24 @@ static int count_active(struct supertype *st, int mdfd, char **availp,
if (avail[i])
avail[i]--;
avail[info.disk.raid_disk] = 2;
- free(best_super);
+ st->ss->free_super(best_super);
best_super = super;
super = NULL;
} else { /* info.events much bigger */
cnt = 1; cnt1 = 0;
memset(avail, 0, info.disk.raid_disk);
max_events = info.events;
- free(best_super);
+ st->ss->free_super(best_super);
best_super = super;
super = NULL;
}
}
if (super)
- free(super);
+ st->ss->free_super(super);
}
if (best_super) {
st->ss->getinfo_super(bestinfo,best_super);
- free(best_super);
+ st->ss->free_super(best_super);
}
return cnt + cnt1;
}
@@ -636,7 +636,7 @@ void RebuildMap(void)
map_add(&map, md->devnum, st->ss->major,
st->minor_version,
info.uuid, path ? : "/unknown");
- free(super);
+ st->ss->free_super(super);
break;
}
}