Page MenuHomeFreeBSD

D35787.diff
No OneTemporary

D35787.diff

diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -787,6 +787,20 @@
swp_pager_meta_free_all(object);
object->handle = NULL;
object->type = OBJT_DEAD;
+
+ /*
+ * Release the allocation charge.
+ */
+ if (object->cred != NULL) {
+ swap_release_by_cred(object->charge, object->cred);
+ object->charge = 0;
+ crfree(object->cred);
+ object->cred = NULL;
+ }
+
+ /*
+ * Hide the object from swap_pager_swapoff().
+ */
vm_object_clear_flag(object, OBJ_SWAP);
}
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -702,27 +702,9 @@
}
}
-/*
- * vm_object_destroy removes the object from the global object list
- * and frees the space for the object.
- */
void
vm_object_destroy(vm_object_t object)
{
-
- /*
- * Release the allocation charge.
- */
- if (object->cred != NULL) {
- swap_release_by_cred(object->charge, object->cred);
- object->charge = 0;
- crfree(object->cred);
- object->cred = NULL;
- }
-
- /*
- * Free the space for the object.
- */
uma_zfree(obj_zone, object);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 7:46 AM (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14655442
Default Alt Text
D35787.diff (1 KB)

Event Timeline