summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-03-20 10:19:09 +0000
committerdg <dg@FreeBSD.org>1995-03-20 10:19:09 +0000
commitb9e7140c7c69e5fff051dbec1cbd376a4f854a3b (patch)
treec1c29dd0a2b6c4b09c210e623486373d98fd9bb9
parentba7cc6e6a91672b2647c731957bf5f3d0aa5f11d (diff)
downloadFreeBSD-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.
-rw-r--r--sys/kern/vfs_export.c17
-rw-r--r--sys/kern/vfs_subr.c17
2 files changed, 10 insertions, 24 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 6274e20..726899c 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.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) &&
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) &&
OpenPOWER on IntegriCloud