Eliminate a redundant parameter to vm_radix_replace().
Improve the wording of the comment describing vm_radix_replace(). Reviewed by: attilio MFC after: 6 weeks Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
c1788b63ab
commit
703b304f33
@ -1200,7 +1200,7 @@ vm_page_replace(vm_page_t mnew, vm_object_t object, vm_pindex_t pindex)
|
|||||||
|
|
||||||
mnew->object = object;
|
mnew->object = object;
|
||||||
mnew->pindex = pindex;
|
mnew->pindex = pindex;
|
||||||
mold = vm_radix_replace(&object->rtree, mnew, pindex);
|
mold = vm_radix_replace(&object->rtree, mnew);
|
||||||
KASSERT(mold->queue == PQ_NONE,
|
KASSERT(mold->queue == PQ_NONE,
|
||||||
("vm_page_replace: mold is on a paging queue"));
|
("vm_page_replace: mold is on a paging queue"));
|
||||||
|
|
||||||
|
@ -788,20 +788,18 @@ vm_radix_reclaim_allnodes(struct vm_radix *rtree)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replace an existing page into the trie with another one.
|
* Replace an existing page in the trie with another one.
|
||||||
* Panics if the replacing page is not present or if the new page has an
|
* Panics if there is not an old page in the trie at the new page's index.
|
||||||
* invalid key.
|
|
||||||
*/
|
*/
|
||||||
vm_page_t
|
vm_page_t
|
||||||
vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, vm_pindex_t index)
|
vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage)
|
||||||
{
|
{
|
||||||
struct vm_radix_node *rnode;
|
struct vm_radix_node *rnode;
|
||||||
vm_page_t m;
|
vm_page_t m;
|
||||||
|
vm_pindex_t index;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
KASSERT(newpage->pindex == index, ("%s: newpage index invalid",
|
index = newpage->pindex;
|
||||||
__func__));
|
|
||||||
|
|
||||||
rnode = vm_radix_getroot(rtree);
|
rnode = vm_radix_getroot(rtree);
|
||||||
if (rnode == NULL)
|
if (rnode == NULL)
|
||||||
panic("%s: replacing page on an empty trie", __func__);
|
panic("%s: replacing page on an empty trie", __func__);
|
||||||
|
@ -43,8 +43,7 @@ vm_page_t vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index);
|
|||||||
vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index);
|
vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index);
|
||||||
void vm_radix_reclaim_allnodes(struct vm_radix *rtree);
|
void vm_radix_reclaim_allnodes(struct vm_radix *rtree);
|
||||||
void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index);
|
void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index);
|
||||||
vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage,
|
vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage);
|
||||||
vm_pindex_t index);
|
|
||||||
|
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
#endif /* !_VM_RADIX_H_ */
|
#endif /* !_VM_RADIX_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user