Author: jhb
Date: Tue Feb 11 22:05:21 2014
New Revision: 261782
URL: http://svnweb.freebsd.org/changeset/base/261782

Log:
  Correct assertion to assert that the existing device VM object uses the
  same type rather than asserting in the case where we just created a new
  VM object.
  
  Reviewed by:  kib

Modified:
  head/sys/vm/device_pager.c

Modified: head/sys/vm/device_pager.c
==============================================================================
--- head/sys/vm/device_pager.c  Tue Feb 11 22:02:40 2014        (r261781)
+++ head/sys/vm/device_pager.c  Tue Feb 11 22:05:21 2014        (r261782)
@@ -169,18 +169,20 @@ cdev_pager_allocate(void *handle, enum o
                         */
                        if (pindex > object->size)
                                object->size = pindex;
+                       KASSERT(object->type == tp,
+                   ("Inconsistent device pager type %p %d", object, tp));
                } else {
                        object = object1;
                        object1 = NULL;
                        object->handle = handle;
                        TAILQ_INSERT_TAIL(&dev_pager_object_list, object,
                            pager_object_list);
-                       KASSERT(object->type == tp,
-               ("Inconsistent device pager type %p %d", object, tp));
                }
        } else {
                if (pindex > object->size)
                        object->size = pindex;
+               KASSERT(object->type == tp,
+                   ("Inconsistent device pager type %p %d", object, tp));
        }
        mtx_unlock(&dev_pager_mtx);
        if (object1 != NULL) {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to