Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108594402
D40401.id122775.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D40401.id122775.diff
View Options
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -327,7 +327,7 @@
{
struct vm_domain *vmd;
vm_page_t m;
- int ret;
+ bool found;
m = vm_phys_paddr_to_vm_page(pa);
if (m == NULL)
@@ -335,15 +335,15 @@
vmd = vm_pagequeue_domain(m);
vm_domain_free_lock(vmd);
- ret = vm_phys_unfree_page(m);
+ found = vm_phys_unfree_page(m);
vm_domain_free_unlock(vmd);
- if (ret != 0) {
+ if (found) {
vm_domain_freecnt_inc(vmd, -1);
TAILQ_INSERT_TAIL(&blacklist_head, m, listq);
if (verbose)
printf("Skipping page with pa 0x%jx\n", (uintmax_t)pa);
}
- return (ret);
+ return (found);
}
/*
diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h
--- a/sys/vm/vm_phys.h
+++ b/sys/vm/vm_phys.h
@@ -79,7 +79,7 @@
int *locality);
vm_page_t vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low,
vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options);
-boolean_t vm_phys_unfree_page(vm_page_t m);
+bool vm_phys_unfree_page(vm_page_t m);
int vm_phys_mem_affinity(int f, int t);
void vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end);
vm_paddr_t vm_phys_early_alloc(int domain, size_t alloc_size);
diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -1301,12 +1301,12 @@
/*
* Search for the given physical page "m" in the free lists. If the search
- * succeeds, remove "m" from the free lists and return TRUE. Otherwise, return
- * FALSE, indicating that "m" is not in the free lists.
+ * succeeds, remove "m" from the free lists and return true. Otherwise, return
+ * false, indicating that "m" is not in the free lists.
*
* The free page queues must be locked.
*/
-boolean_t
+bool
vm_phys_unfree_page(vm_page_t m)
{
struct vm_freelist *fl;
@@ -1329,12 +1329,12 @@
if (pa >= seg->start)
m_set = &seg->first_page[atop(pa - seg->start)];
else
- return (FALSE);
+ return (false);
}
if (m_set->order < order)
- return (FALSE);
+ return (false);
if (m_set->order == VM_NFREEORDER)
- return (FALSE);
+ return (false);
KASSERT(m_set->order < VM_NFREEORDER,
("vm_phys_unfree_page: page %p has unexpected order %d",
m_set, m_set->order));
@@ -1360,7 +1360,7 @@
vm_freelist_add(fl, m_tmp, order, 0);
}
KASSERT(m_set == m, ("vm_phys_unfree_page: fatal inconsistency"));
- return (TRUE);
+ return (true);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:18 PM (4 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16203717
Default Alt Text
D40401.id122775.diff (2 KB)
Attached To
Mode
D40401: vm_phys: Change the return type of vm_phys_unfree_page() to bool
Attached
Detach File
Event Timeline
Log In to Comment