diff options
author | phk <phk@FreeBSD.org> | 1999-08-29 09:09:12 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-29 09:09:12 +0000 |
commit | 244faf2e1bea24c6fcd49a96a0891eccf5512347 (patch) | |
tree | 42212b7ace3a6c7f66fb134cfdb92513e47759fd /sys/kern/vfs_subr.c | |
parent | b40f30707d14d710c90e70efe406d062ea6b9f7d (diff) | |
download | FreeBSD-src-244faf2e1bea24c6fcd49a96a0891eccf5512347.zip FreeBSD-src-244faf2e1bea24c6fcd49a96a0891eccf5512347.tar.gz |
Add dev_t freeing code. Controlled by sysctl debug.free_devt, default
is off.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c6ce788..b452cc1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1692,7 +1692,7 @@ vclean(vp, flags, p) if (VSHOULDFREE(vp)) vfree(vp); - + /* * Done with purge, notify sleepers of the grim news. */ @@ -1821,6 +1821,7 @@ vgonel(vp, p) if ((vp->v_type == VBLK || vp->v_type == VCHR) && vp->v_rdev != NULL) { simple_lock(&spechash_slock); SLIST_REMOVE(&vp->v_hashchain, vp, vnode, v_specnext); + freedev(vp->v_rdev); simple_unlock(&spechash_slock); vp->v_rdev = NULL; } |