|
@@ -75,6 +75,25 @@ int item_delete(struct radix_tree_root *root, unsigned long index)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void item_free_rcu(struct rcu_head *head)
|
|
|
+{
|
|
|
+ struct item *item = container_of(head, struct item, rcu_head);
|
|
|
+
|
|
|
+ free(item);
|
|
|
+}
|
|
|
+
|
|
|
+int item_delete_rcu(struct radix_tree_root *root, unsigned long index)
|
|
|
+{
|
|
|
+ struct item *item = radix_tree_delete(root, index);
|
|
|
+
|
|
|
+ if (item) {
|
|
|
+ item_sanity(item, index);
|
|
|
+ call_rcu(&item->rcu_head, item_free_rcu);
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
void item_check_present(struct radix_tree_root *root, unsigned long index)
|
|
|
{
|
|
|
struct item *item;
|