Re: [PATCH 1/3] radix-tree: Implement function radix_tree_gang_tag_if_tagged

Nick Piggin
2010-02-15T16:01:24Z

On Fri, Feb 12, 2010 at 12:06:22AM +0100, Jan Kara wrote:
> Implement function for setting one tag if another tag is set
> for each item in given range.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> include/linux/radix-tree.h | 3 ++
> lib/radix-tree.c | 82 ++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 85 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
> index c5da749..41fa087 100644
> --- a/include/linux/radix-tree.h
> +++ b/include/linux/radix-tree.h
> @@ -185,6 +185,9 @@ unsigned int
> radix_tree_gang_lookup_tag_slot(struct radix_tree_root *root, void ***results,
> unsigned long first_index, unsigned int max_items,
> unsigned int tag);
> +unsigned long radix_tree_gang_tag_if_tagged(struct radix_tree_root *root,
> + unsigned long first_index, unsigned long last_index,
> + unsigned int fromtag, unsigned int totag);

Really minor thing here, I think I called my equivalent something
like radix_tree_tag_set_if_tagged. We don't use tag/untag naming
but tag_set/tag_clear.