svn commit: r269053 - head/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Thu Jul 24 10:25:43 UTC 2014
Author: kib
Date: Thu Jul 24 10:25:42 2014
New Revision: 269053
URL: http://svnweb.freebsd.org/changeset/base/269053
Log:
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
Modified:
head/sys/vm/vm_object.c
Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c Thu Jul 24 10:14:51 2014 (r269052)
+++ head/sys/vm/vm_object.c Thu Jul 24 10:25:42 2014 (r269053)
@@ -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--;
More information about the svn-src-head
mailing list