swap_pager_find_least(): assert that the function is called on the right object type
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
This commit is contained in:
@@ -2259,6 +2259,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex)
|
||||
int i;
|
||||
|
||||
VM_OBJECT_ASSERT_LOCKED(object);
|
||||
MPASS((object->flags & OBJ_SWAP) != 0);
|
||||
|
||||
if (pctrie_is_empty(&object->un_pager.swp.swp_blks))
|
||||
return (object->size);
|
||||
|
||||
Reference in New Issue
Block a user