Make sure to kill the devstat entry for disappearing disks.

PR:	68074
Submitted by:	Hendrik Scholz <hscholz@raisdorf.net>
This commit is contained in:
phk 2004-06-27 20:53:20 +00:00
parent 22bccaefb7
commit 949e8d87fe

View File

@ -404,7 +404,9 @@ disk_destroy(struct disk *dp)
g_cancel_event(dp);
dp->d_destroyed = 1;
g_post_event(g_disk_destroy, dp, M_WAITOK, NULL);
if (dp->d_devstat != NULL)
devstat_remove_entry(dp->d_devstat);
g_post_event(g_disk_destroy, dp, M_WAITOK, NULL, NULL);
}
static void