Implement radix_tree_iter_delete() in the LinuxKPI.

Submitted by:	Johannes Lundberg <johalun0@gmail.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
Hans Petter Selasky 2018-06-01 11:42:09 +00:00
parent 0a85496223
commit 6fad8d171a
2 changed files with 8 additions and 0 deletions
sys/compat/linuxkpi/common

View File

@ -79,5 +79,6 @@ void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
void *radix_tree_delete(struct radix_tree_root *, unsigned long);
int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
bool radix_tree_iter_find(struct radix_tree_root *, struct radix_tree_iter *, void ***);
void radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **);
#endif /* _LINUX_RADIX_TREE_H_ */

View File

@ -162,6 +162,13 @@ radix_tree_delete(struct radix_tree_root *root, unsigned long index)
return (item);
}
void
radix_tree_iter_delete(struct radix_tree_root *root,
struct radix_tree_iter *iter, void **slot)
{
radix_tree_delete(root, iter->index);
}
int
radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item)
{