diff options
author | dg <dg@FreeBSD.org> | 1995-03-20 10:19:09 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-20 10:19:09 +0000 |
commit | b9e7140c7c69e5fff051dbec1cbd376a4f854a3b (patch) | |
tree | c1c29dd0a2b6c4b09c210e623486373d98fd9bb9 /sys/kern/vfs_subr.c | |
parent | ba7cc6e6a91672b2647c731957bf5f3d0aa5f11d (diff) | |
download | FreeBSD-src-b9e7140c7c69e5fff051dbec1cbd376a4f854a3b.zip FreeBSD-src-b9e7140c7c69e5fff051dbec1cbd376a4f854a3b.tar.gz |
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.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 17 |
1 files changed, 5 insertions, 12 deletions
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) && |