MFp4: We don't really need g_mirror_free_disk() function.
This commit is contained in:
parent
c413d99c4e
commit
e1efe7edcd
@ -398,19 +398,6 @@ g_mirror_init_disk(struct g_mirror_softc *sc, struct g_provider *pp,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the disk.
|
||||
*/
|
||||
static void
|
||||
g_mirror_free_disk(struct g_mirror_disk *disk)
|
||||
{
|
||||
|
||||
g_topology_assert();
|
||||
|
||||
g_mirror_disconnect_disk(disk);
|
||||
free(disk, M_MIRROR);
|
||||
}
|
||||
|
||||
static void
|
||||
g_mirror_destroy_disk(struct g_mirror_disk *disk)
|
||||
{
|
||||
@ -430,7 +417,8 @@ g_mirror_destroy_disk(struct g_mirror_disk *disk)
|
||||
case G_MIRROR_DISK_STATE_NEW:
|
||||
case G_MIRROR_DISK_STATE_STALE:
|
||||
case G_MIRROR_DISK_STATE_ACTIVE:
|
||||
g_mirror_free_disk(disk);
|
||||
g_mirror_disconnect_disk(disk);
|
||||
free(disk, M_MIRROR);
|
||||
break;
|
||||
default:
|
||||
KASSERT(0 == 1, ("Wrong disk state (%s, %s).",
|
||||
|
Loading…
Reference in New Issue
Block a user