From b9e7140c7c69e5fff051dbec1cbd376a4f854a3b Mon Sep 17 00:00:00 2001 From: dg Date: Mon, 20 Mar 1995 10:19:09 +0000 Subject: Don't gain/lose a reference to the object when yanking its pages in vinvalbuf()...it will cause vnode locking problems in vm_object_terminate, and isn't necessary anyway. --- sys/kern/vfs_subr.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'sys/kern/vfs_subr.c') diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 6274e20..726899c 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94 - * $Id: vfs_subr.c,v 1.23 1995/03/16 18:12:49 bde Exp $ + * $Id: vfs_subr.c,v 1.24 1995/03/20 02:08:24 davidg Exp $ */ /* @@ -512,18 +512,11 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) * Destroy the copy in the VM cache, too. */ if ((flags & V_SAVE) == 0) { - pager = NULL; object = (vm_object_t) vp->v_vmdata; - if (object != NULL) - pager = object->pager; - if (pager != NULL) { - object = vm_object_lookup(pager); - if (object) { - vm_object_lock(object); - vm_object_page_remove(object, 0, object->size); - vm_object_unlock(object); - vm_object_deallocate(object); - } + if (object != NULL) { + vm_object_lock(object); + vm_object_page_remove(object, 0, object->size); + vm_object_unlock(object); } } if (!(flags & V_SAVEMETA) && -- cgit v1.1