From f820bc501ea6e1bd711fd47b947a5ccb4aff90f5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 16 May 2003 07:28:27 +0000 Subject: [PATCH] Use vm_object_deallocate(), not vm_pager_deallocate(), to destroy a vm object. (vm_pager_deallocate() does not, in fact, destroy a vm object.) Approved by: re (scottl) Reviewed by: phk --- sys/dev/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index a3f4f92811c4..7071a3ea4673 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -932,7 +932,7 @@ mddestroy(struct md_s *sc, struct thread *td) if (sc->cred != NULL) crfree(sc->cred); if (sc->object != NULL) { - vm_pager_deallocate(sc->object); + vm_object_deallocate(sc->object); } if (sc->indir) destroy_indir(sc, sc->indir); @@ -990,7 +990,7 @@ mdcreate_swap(struct md_ioctl *mdio, struct thread *td) sc->flags = mdio->md_options & MD_FORCE; if (mdio->md_options & MD_RESERVE) { if (swap_pager_reserve(sc->object, 0, sc->nsect) < 0) { - vm_pager_deallocate(sc->object); + vm_object_deallocate(sc->object); sc->object = NULL; mddestroy(sc, td); return (EDOM);