diff options
author | alc <alc@FreeBSD.org> | 2013-03-17 16:06:03 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-03-17 16:06:03 +0000 |
commit | b346e448af4fd8a3d9a582e850a73123d59e467f (patch) | |
tree | 858e7bfe2f55f71153cb9b03fcf3d6caa40b68f6 /sys/vm/vm_radix.c | |
parent | a2e67affe3d12d77ed0950538f3fd7bf0963454c (diff) | |
download | FreeBSD-src-b346e448af4fd8a3d9a582e850a73123d59e467f.zip FreeBSD-src-b346e448af4fd8a3d9a582e850a73123d59e467f.tar.gz |
Simplify the interface to vm_radix_insert() by eliminating the parameter
"index". The content of a radix tree leaf, or at least its "key", is not
opaque to the other radix tree operations. Specifically, they know how to
extract the "key" from a leaf. So, eliminating the parameter "index" isn't
breaking the abstraction. Moreover, eliminating the parameter "index"
effectively prevents the caller from passing an inconsistent "index" and
leaf to vm_radix_insert().
Reviewed by: attilio
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/vm/vm_radix.c')
-rw-r--r-- | sys/vm/vm_radix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index d71cb55..0d7fcc6 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -373,16 +373,15 @@ vm_radix_init(void) * Panics if the key already exists. */ void -vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, vm_page_t page) +vm_radix_insert(struct vm_radix *rtree, vm_page_t page) { - vm_pindex_t newind; + vm_pindex_t index, newind; struct vm_radix_node *rnode, *tmp, *tmp2; vm_page_t m; int slot; uint16_t clev; - KASSERT(index == page->pindex, ("%s: index != page->pindex", - __func__)); + index = page->pindex; /* * The owner of record for root is not really important because it |