diff options
author | phk <phk@FreeBSD.org> | 2004-06-27 20:53:20 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-27 20:53:20 +0000 |
commit | 949e8d87fe8c3a0f3076fc265e4db9f4f8cc21ef (patch) | |
tree | ff062a8cdcfc402fe33e7ccbab930bfc5b16364f /sys/geom/geom_disk.c | |
parent | 22bccaefb75abb40168225b9d95c8aa80643e0f6 (diff) | |
download | FreeBSD-src-949e8d87fe8c3a0f3076fc265e4db9f4f8cc21ef.zip FreeBSD-src-949e8d87fe8c3a0f3076fc265e4db9f4f8cc21ef.tar.gz |
Make sure to kill the devstat entry for disappearing disks.
PR: 68074
Submitted by: Hendrik Scholz <hscholz@raisdorf.net>
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r-- | sys/geom/geom_disk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 87ae2ad..7145c0d 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -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 |