radix-tree: Add radix_tree_iter_delete
authorMatthew Wilcox <mawilcox@microsoft.com>
Sat, 28 Jan 2017 14:56:22 +0000 (09:56 -0500)
committerMatthew Wilcox <mawilcox@microsoft.com>
Mon, 13 Feb 2017 21:09:55 +0000 (16:09 -0500)
commit0ac398ef391b53122976325ab6953456ce8e8310
tree99318e48860947c93bb7a230e66834abd67bef7a
parent30b888ba950d9f77326b50a4aa2d7d99557d5718
radix-tree: Add radix_tree_iter_delete

Factor the deletion code out into __radix_tree_delete() and provide a
nice iterator-based wrapper around it.  If we free the node, advance
the iterator to avoid reading from freed memory.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
include/linux/radix-tree.h
lib/radix-tree.c