vm_page_free_pages_toq(): return the count of freed pages

(cherry picked from commit 1784fb44498da8007fb8cd8ee5060894eb5fe1e6)
This commit is contained in:
Konstantin Belousov 2024-09-27 19:20:31 +03:00
parent a5943b6e50
commit b0e45fea61
2 changed files with 4 additions and 3 deletions

View file

@ -3993,14 +3993,14 @@ vm_page_free_toq(vm_page_t m)
* from any VM object. In other words, this is equivalent to
* calling vm_page_free_toq() for each page of a list of VM objects.
*/
void
int
vm_page_free_pages_toq(struct spglist *free, bool update_wire_count)
{
vm_page_t m;
int count;
if (SLIST_EMPTY(free))
return;
return (0);
count = 0;
while ((m = SLIST_FIRST(free)) != NULL) {
@ -4011,6 +4011,7 @@ vm_page_free_pages_toq(struct spglist *free, bool update_wire_count)
if (update_wire_count)
vm_wire_sub(count);
return (count);
}
/*

View file

@ -706,7 +706,7 @@ int vm_page_is_valid(vm_page_t, int, int);
void vm_page_test_dirty(vm_page_t);
vm_page_bits_t vm_page_bits(int base, int size);
void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid);
void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count);
int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count);
void vm_page_dirty_KBI(vm_page_t m);
void vm_page_lock_KBI(vm_page_t m, const char *file, int line);