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
This commit is contained in:
John Baldwin 2014-02-11 22:05:21 +00:00
parent 4f67a8c5e9
commit 8add0ced70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261782

View File

@ -169,18 +169,20 @@ cdev_pager_allocate(void *handle, enum obj_type tp, struct cdev_pager_ops *ops,
*/
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) {