From 516a83f8861269de9f795a96c471623e3bd67009 Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Fri, 11 Oct 2019 10:13:21 -0700 Subject: Function name and comment updates Rename certain functions for more consistency when they share common features. Make comments clearer about what arguments should be passed to the insert and add functions. Reviewed by: Sara Hartse Reviewed-by: Brian Behlendorf Reviewed-by: Matt Ahrens Signed-off-by: Paul Dagnelie Closes #9441 --- module/zfs/btree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/zfs/btree.c') diff --git a/module/zfs/btree.c b/module/zfs/btree.c index 8f514caab..f099eb67c 100644 --- a/module/zfs/btree.c +++ b/module/zfs/btree.c @@ -980,7 +980,7 @@ zfs_btree_bulk_finish(zfs_btree_t *tree) * Insert value into tree at the location specified by where. */ void -zfs_btree_insert(zfs_btree_t *tree, const void *value, +zfs_btree_add_idx(zfs_btree_t *tree, const void *value, const zfs_btree_index_t *where) { zfs_btree_index_t idx = {0}; @@ -1294,7 +1294,7 @@ zfs_btree_add(zfs_btree_t *tree, const void *node) { zfs_btree_index_t where = {0}; VERIFY3P(zfs_btree_find(tree, node, &where), ==, NULL); - zfs_btree_insert(tree, node, &where); + zfs_btree_add_idx(tree, node, &where); } /* Helper function to free a tree node. */ @@ -1542,7 +1542,7 @@ zfs_btree_remove_from_node(zfs_btree_t *tree, zfs_btree_core_t *node, /* Remove the element at the specific location. */ void -zfs_btree_remove_from(zfs_btree_t *tree, zfs_btree_index_t *where) +zfs_btree_remove_idx(zfs_btree_t *tree, zfs_btree_index_t *where) { size_t size = tree->bt_elem_size; zfs_btree_hdr_t *hdr = where->bti_node; @@ -1778,7 +1778,7 @@ zfs_btree_remove(zfs_btree_t *tree, const void *value) { zfs_btree_index_t where = {0}; VERIFY3P(zfs_btree_find(tree, value, &where), !=, NULL); - zfs_btree_remove_from(tree, &where); + zfs_btree_remove_idx(tree, &where); } /* Return the number of elements in the tree. */ -- cgit v1.2.3