summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-07-24 10:25:42 +0000
committerkib <kib@FreeBSD.org>2014-07-24 10:25:42 +0000
commitb50b5e1d490cac7c939a304ba97393bcc321a997 (patch)
tree0db655522bfa1822cfd928e6aca26451eeae66b1 /sys/vm/vm_object.c
parent34c6aed3e28e84a8717849969968451288630dfa (diff)
downloadFreeBSD-src-b50b5e1d490cac7c939a304ba97393bcc321a997.zip
FreeBSD-src-b50b5e1d490cac7c939a304ba97393bcc321a997.tar.gz
Correct assertion. The shadowing object cannot be tmpfs vm object,
and tmpfs object cannot shadow. In other words, tmpfs vm object is always at the bottom of the shadow chain. Reported and tested by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 1b97bdf..504ca77 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -559,8 +559,6 @@ vm_object_deallocate(vm_object_t object)
(object->handle == NULL) &&
(object->type == OBJT_DEFAULT ||
object->type == OBJT_SWAP)) {
- KASSERT((object->flags & OBJ_TMPFS_NODE) == 0,
- ("shadowed tmpfs v_object %p", object));
vm_object_t robject;
robject = LIST_FIRST(&object->shadow_head);
@@ -568,6 +566,8 @@ vm_object_deallocate(vm_object_t object)
("vm_object_deallocate: ref_count: %d, shadow_count: %d",
object->ref_count,
object->shadow_count));
+ KASSERT((robject->flags & OBJ_TMPFS_NODE) == 0,
+ ("shadowed tmpfs v_object %p", object));
if (!VM_OBJECT_TRYWLOCK(robject)) {
/*
* Avoid a potential deadlock.
@@ -637,6 +637,8 @@ retry:
doterm:
temp = object->backing_object;
if (temp != NULL) {
+ KASSERT((object->flags & OBJ_TMPFS_NODE) == 0,
+ ("shadowed tmpfs v_object 2 %p", object));
VM_OBJECT_WLOCK(temp);
LIST_REMOVE(object, shadow_list);
temp->shadow_count--;
OpenPOWER on IntegriCloud