edit 73 include/linux/assoc_array.h extern void assoc_array_insert_set_object(struct assoc_array_edit *edit, edit 80 include/linux/assoc_array.h extern void assoc_array_apply_edit(struct assoc_array_edit *edit); edit 81 include/linux/assoc_array.h extern void assoc_array_cancel_edit(struct assoc_array_edit *edit); edit 451 lib/assoc_array.c static bool assoc_array_insert_in_empty_tree(struct assoc_array_edit *edit) edit 461 lib/assoc_array.c edit->new_meta[0] = assoc_array_node_to_ptr(new_n0); edit 462 lib/assoc_array.c edit->leaf_p = &new_n0->slots[0]; edit 463 lib/assoc_array.c edit->adjust_count_on = new_n0; edit 464 lib/assoc_array.c edit->set[0].ptr = &edit->array->root; edit 465 lib/assoc_array.c edit->set[0].to = assoc_array_node_to_ptr(new_n0); edit 474 lib/assoc_array.c static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, edit 490 lib/assoc_array.c edit->segment_cache[ASSOC_ARRAY_FAN_OUT] = result->terminal_node.slot; edit 514 lib/assoc_array.c edit->leaf_p = &node->slots[i]; edit 515 lib/assoc_array.c edit->dead_leaf = node->slots[i]; edit 526 lib/assoc_array.c edit->leaf_p = &node->slots[free_slot]; edit 527 lib/assoc_array.c edit->adjust_count_on = node; edit 542 lib/assoc_array.c edit->new_meta[0] = assoc_array_node_to_ptr(new_n0); edit 546 lib/assoc_array.c edit->new_meta[1] = assoc_array_node_to_ptr(new_n1); edit 554 lib/assoc_array.c edit->segment_cache[i] = 0xff; edit 561 lib/assoc_array.c edit->segment_cache[i] = base_seg & ASSOC_ARRAY_FAN_MASK; edit 571 lib/assoc_array.c base_seg = edit->segment_cache[0]; edit 573 lib/assoc_array.c dissimilarity |= edit->segment_cache[i] ^ base_seg; edit 581 lib/assoc_array.c if ((edit->segment_cache[ASSOC_ARRAY_FAN_OUT] ^ base_seg) == 0) edit 613 lib/assoc_array.c edit->set[0].to = assoc_array_node_to_ptr(new_n0); edit 632 lib/assoc_array.c slot = edit->segment_cache[i]; edit 635 lib/assoc_array.c if (edit->segment_cache[j] == slot) edit 661 lib/assoc_array.c if (edit->segment_cache[i] == slot) { edit 674 lib/assoc_array.c if (edit->segment_cache[ASSOC_ARRAY_FAN_OUT] != slot) { edit 678 lib/assoc_array.c edit->leaf_p = &new_n0->slots[free_slot]; edit 679 lib/assoc_array.c edit->adjust_count_on = new_n0; edit 681 lib/assoc_array.c edit->leaf_p = &new_n1->slots[next_slot++]; edit 682 lib/assoc_array.c edit->adjust_count_on = new_n1; edit 687 lib/assoc_array.c edit->set_backpointers_to = assoc_array_node_to_ptr(new_n0); edit 689 lib/assoc_array.c if (edit->segment_cache[i] == 0xff) { edit 694 lib/assoc_array.c edit->set_backpointers[i] = &side->back_pointer; edit 697 lib/assoc_array.c edit->set_backpointers[i] = &shortcut->back_pointer; edit 704 lib/assoc_array.c edit->set[0].ptr = &edit->array->root; edit 706 lib/assoc_array.c edit->set[0].ptr = &assoc_array_ptr_to_node(ptr)->slots[node->parent_slot]; edit 708 lib/assoc_array.c edit->set[0].ptr = &assoc_array_ptr_to_shortcut(ptr)->next_node; edit 709 lib/assoc_array.c edit->excised_meta[0] = assoc_array_node_to_ptr(node); edit 748 lib/assoc_array.c edit->new_meta[2] = assoc_array_shortcut_to_ptr(new_s0); edit 750 lib/assoc_array.c edit->set[0].to = assoc_array_shortcut_to_ptr(new_s0); edit 781 lib/assoc_array.c edit->segment_cache[i] = base_seg & ASSOC_ARRAY_FAN_MASK; edit 786 lib/assoc_array.c edit->segment_cache[ASSOC_ARRAY_FAN_OUT] = base_seg & ASSOC_ARRAY_FAN_MASK; edit 793 lib/assoc_array.c static bool assoc_array_insert_mid_shortcut(struct assoc_array_edit *edit, edit 825 lib/assoc_array.c edit->set[0].ptr = &edit->array->root; edit 828 lib/assoc_array.c edit->set[0].ptr = &node->slots[shortcut->parent_slot]; edit 833 lib/assoc_array.c edit->excised_meta[0] = assoc_array_shortcut_to_ptr(shortcut); edit 839 lib/assoc_array.c edit->new_meta[0] = assoc_array_node_to_ptr(new_n0); edit 840 lib/assoc_array.c edit->adjust_count_on = new_n0; edit 856 lib/assoc_array.c edit->new_meta[1] = assoc_array_shortcut_to_ptr(new_s0); edit 857 lib/assoc_array.c edit->set[0].to = assoc_array_shortcut_to_ptr(new_s0); edit 874 lib/assoc_array.c edit->set[0].to = assoc_array_node_to_ptr(new_n0); edit 906 lib/assoc_array.c edit->new_meta[2] = assoc_array_shortcut_to_ptr(new_s1); edit 918 lib/assoc_array.c edit->set[1].ptr = &side->back_pointer; edit 919 lib/assoc_array.c edit->set[1].to = assoc_array_shortcut_to_ptr(new_s1); edit 929 lib/assoc_array.c edit->set_parent_slot[0].p = &side->parent_slot; edit 930 lib/assoc_array.c edit->set_parent_slot[0].to = sc_slot; edit 931 lib/assoc_array.c edit->set[1].ptr = &side->back_pointer; edit 932 lib/assoc_array.c edit->set[1].to = assoc_array_node_to_ptr(new_n0); edit 937 lib/assoc_array.c edit->leaf_p = &new_n0->slots[1]; edit 939 lib/assoc_array.c edit->leaf_p = &new_n0->slots[0]; edit 942 lib/assoc_array.c return edit; edit 970 lib/assoc_array.c struct assoc_array_edit *edit; edit 981 lib/assoc_array.c edit = kzalloc(sizeof(struct assoc_array_edit), GFP_KERNEL); edit 982 lib/assoc_array.c if (!edit) edit 984 lib/assoc_array.c edit->array = array; edit 985 lib/assoc_array.c edit->ops = ops; edit 986 lib/assoc_array.c edit->leaf = assoc_array_leaf_to_ptr(object); edit 987 lib/assoc_array.c edit->adjust_count_by = 1; edit 992 lib/assoc_array.c if (!assoc_array_insert_in_empty_tree(edit)) edit 994 lib/assoc_array.c return edit; edit 1001 lib/assoc_array.c if (!assoc_array_insert_into_terminal_node(edit, ops, index_key, edit 1004 lib/assoc_array.c return edit; edit 1010 lib/assoc_array.c if (!assoc_array_insert_mid_shortcut(edit, ops, &result)) edit 1012 lib/assoc_array.c return edit; edit 1018 lib/assoc_array.c assoc_array_cancel_edit(edit); edit 1031 lib/assoc_array.c void assoc_array_insert_set_object(struct assoc_array_edit *edit, void *object) edit 1034 lib/assoc_array.c edit->leaf = assoc_array_leaf_to_ptr(object); edit 1086 lib/assoc_array.c struct assoc_array_edit *edit; edit 1093 lib/assoc_array.c edit = kzalloc(sizeof(struct assoc_array_edit), GFP_KERNEL); edit 1094 lib/assoc_array.c if (!edit) edit 1096 lib/assoc_array.c edit->array = array; edit 1097 lib/assoc_array.c edit->ops = ops; edit 1098 lib/assoc_array.c edit->adjust_count_by = -1; edit 1120 lib/assoc_array.c assoc_array_cancel_edit(edit); edit 1131 lib/assoc_array.c edit->dead_leaf = node->slots[slot]; edit 1132 lib/assoc_array.c edit->set[0].ptr = &node->slots[slot]; edit 1133 lib/assoc_array.c edit->set[0].to = NULL; edit 1134 lib/assoc_array.c edit->adjust_count_on = node; edit 1140 lib/assoc_array.c edit->set[1].ptr = &array->root; edit 1141 lib/assoc_array.c edit->set[1].to = NULL; edit 1142 lib/assoc_array.c edit->adjust_count_on = NULL; edit 1143 lib/assoc_array.c edit->excised_subtree = array->root; edit 1145 lib/assoc_array.c return edit; edit 1213 lib/assoc_array.c edit->new_meta[0] = assoc_array_node_to_ptr(new_n0); edit 1218 lib/assoc_array.c edit->adjust_count_on = new_n0; edit 1221 lib/assoc_array.c collapse.skip_leaf = assoc_array_ptr_to_leaf(edit->dead_leaf); edit 1231 lib/assoc_array.c edit->set[1].ptr = &array->root; edit 1237 lib/assoc_array.c edit->set[1].ptr = &p->slots[node->parent_slot]; edit 1241 lib/assoc_array.c edit->set[1].ptr = &s->next_node; edit 1243 lib/assoc_array.c edit->set[1].to = assoc_array_node_to_ptr(new_n0); edit 1244 lib/assoc_array.c edit->excised_subtree = assoc_array_node_to_ptr(node); edit 1248 lib/assoc_array.c return edit; edit 1253 lib/assoc_array.c assoc_array_cancel_edit(edit); edit 1278 lib/assoc_array.c struct assoc_array_edit *edit; edit 1285 lib/assoc_array.c edit = kzalloc(sizeof(struct assoc_array_edit), GFP_KERNEL); edit 1286 lib/assoc_array.c if (!edit) edit 1288 lib/assoc_array.c edit->array = array; edit 1289 lib/assoc_array.c edit->ops = ops; edit 1290 lib/assoc_array.c edit->set[1].ptr = &array->root; edit 1291 lib/assoc_array.c edit->set[1].to = NULL; edit 1292 lib/assoc_array.c edit->excised_subtree = array->root; edit 1293 lib/assoc_array.c edit->ops_for_excised_subtree = ops; edit 1295 lib/assoc_array.c return edit; edit 1303 lib/assoc_array.c struct assoc_array_edit *edit = edit 1309 lib/assoc_array.c if (edit->dead_leaf) edit 1310 lib/assoc_array.c edit->ops->free_object(assoc_array_ptr_to_leaf(edit->dead_leaf)); edit 1311 lib/assoc_array.c for (i = 0; i < ARRAY_SIZE(edit->excised_meta); i++) edit 1312 lib/assoc_array.c if (edit->excised_meta[i]) edit 1313 lib/assoc_array.c kfree(assoc_array_ptr_to_node(edit->excised_meta[i])); edit 1315 lib/assoc_array.c if (edit->excised_subtree) { edit 1316 lib/assoc_array.c BUG_ON(assoc_array_ptr_is_leaf(edit->excised_subtree)); edit 1317 lib/assoc_array.c if (assoc_array_ptr_is_node(edit->excised_subtree)) { edit 1319 lib/assoc_array.c assoc_array_ptr_to_node(edit->excised_subtree); edit 1323 lib/assoc_array.c assoc_array_ptr_to_shortcut(edit->excised_subtree); edit 1326 lib/assoc_array.c assoc_array_destroy_subtree(edit->excised_subtree, edit 1327 lib/assoc_array.c edit->ops_for_excised_subtree); edit 1330 lib/assoc_array.c kfree(edit); edit 1346 lib/assoc_array.c void assoc_array_apply_edit(struct assoc_array_edit *edit) edit 1356 lib/assoc_array.c if (edit->leaf_p) edit 1357 lib/assoc_array.c *edit->leaf_p = edit->leaf; edit 1360 lib/assoc_array.c for (i = 0; i < ARRAY_SIZE(edit->set_parent_slot); i++) edit 1361 lib/assoc_array.c if (edit->set_parent_slot[i].p) edit 1362 lib/assoc_array.c *edit->set_parent_slot[i].p = edit->set_parent_slot[i].to; edit 1365 lib/assoc_array.c for (i = 0; i < ARRAY_SIZE(edit->set_backpointers); i++) edit 1366 lib/assoc_array.c if (edit->set_backpointers[i]) edit 1367 lib/assoc_array.c *edit->set_backpointers[i] = edit->set_backpointers_to; edit 1370 lib/assoc_array.c for (i = 0; i < ARRAY_SIZE(edit->set); i++) edit 1371 lib/assoc_array.c if (edit->set[i].ptr) edit 1372 lib/assoc_array.c *edit->set[i].ptr = edit->set[i].to; edit 1374 lib/assoc_array.c if (edit->array->root == NULL) { edit 1375 lib/assoc_array.c edit->array->nr_leaves_on_tree = 0; edit 1376 lib/assoc_array.c } else if (edit->adjust_count_on) { edit 1377 lib/assoc_array.c node = edit->adjust_count_on; edit 1379 lib/assoc_array.c node->nr_leaves_on_branch += edit->adjust_count_by; edit 1394 lib/assoc_array.c edit->array->nr_leaves_on_tree += edit->adjust_count_by; edit 1397 lib/assoc_array.c call_rcu(&edit->rcu, assoc_array_rcu_cleanup); edit 1410 lib/assoc_array.c void assoc_array_cancel_edit(struct assoc_array_edit *edit) edit 1418 lib/assoc_array.c for (i = 0; i < ARRAY_SIZE(edit->new_meta); i++) { edit 1419 lib/assoc_array.c ptr = edit->new_meta[i]; edit 1427 lib/assoc_array.c kfree(edit); edit 1461 lib/assoc_array.c struct assoc_array_edit *edit; edit 1472 lib/assoc_array.c edit = kzalloc(sizeof(struct assoc_array_edit), GFP_KERNEL); edit 1473 lib/assoc_array.c if (!edit) edit 1475 lib/assoc_array.c edit->array = array; edit 1476 lib/assoc_array.c edit->ops = ops; edit 1477 lib/assoc_array.c edit->ops_for_excised_subtree = ops; edit 1478 lib/assoc_array.c edit->set[0].ptr = &array->root; edit 1479 lib/assoc_array.c edit->excised_subtree = array->root; edit 1710 lib/assoc_array.c edit->set[0].to = new_root; edit 1711 lib/assoc_array.c assoc_array_apply_edit(edit); edit 1717 lib/assoc_array.c assoc_array_destroy_subtree(new_root, edit->ops); edit 1718 lib/assoc_array.c kfree(edit); edit 105 security/keys/internal.h struct assoc_array_edit *edit); edit 501 security/keys/key.c struct assoc_array_edit *edit = NULL; edit 520 security/keys/key.c ret = __key_link_begin(keyring, &key->index_key, &edit); edit 534 security/keys/key.c ret = __key_instantiate_and_link(key, &prep, keyring, authkey, &edit); edit 538 security/keys/key.c __key_link_end(keyring, &key->index_key, edit); edit 575 security/keys/key.c struct assoc_array_edit *edit = NULL; edit 590 security/keys/key.c link_ret = __key_link_begin(keyring, &key->index_key, &edit); edit 592 security/keys/key.c __key_link_end(keyring, &key->index_key, edit); edit 613 security/keys/key.c __key_link(key, &edit); edit 623 security/keys/key.c __key_link_end(keyring, &key->index_key, edit); edit 820 security/keys/key.c struct assoc_array_edit *edit = NULL; edit 877 security/keys/key.c ret = __key_link_begin(keyring, &index_key, &edit); edit 932 security/keys/key.c ret = __key_instantiate_and_link(key, &prep, keyring, NULL, &edit); edit 942 security/keys/key.c __key_link_end(keyring, &index_key, edit); edit 955 security/keys/key.c __key_link_end(keyring, &index_key, edit); edit 1294 security/keys/keyring.c struct assoc_array_edit *edit; edit 1312 security/keys/keyring.c edit = assoc_array_insert(&keyring->keys, edit 1316 security/keys/keyring.c if (IS_ERR(edit)) { edit 1317 security/keys/keyring.c ret = PTR_ERR(edit); edit 1324 security/keys/keyring.c if (!edit->dead_leaf) { edit 1331 security/keys/keyring.c *_edit = edit; edit 1336 security/keys/keyring.c assoc_array_cancel_edit(edit); edit 1380 security/keys/keyring.c struct assoc_array_edit *edit) edit 1387 security/keys/keyring.c if (edit) { edit 1388 security/keys/keyring.c if (!edit->dead_leaf) { edit 1392 security/keys/keyring.c assoc_array_cancel_edit(edit); edit 1433 security/keys/keyring.c struct assoc_array_edit *edit = NULL; edit 1445 security/keys/keyring.c ret = __key_link_begin(keyring, &key->index_key, &edit); edit 1454 security/keys/keyring.c __key_link(key, &edit); edit 1457 security/keys/keyring.c __key_link_end(keyring, &key->index_key, edit); edit 1483 security/keys/keyring.c struct assoc_array_edit *edit; edit 1487 security/keys/keyring.c edit = assoc_array_delete(&keyring->keys, &keyring_assoc_array_ops, edit 1489 security/keys/keyring.c if (IS_ERR(edit)) edit 1490 security/keys/keyring.c return PTR_ERR(edit); edit 1492 security/keys/keyring.c if (!edit) edit 1495 security/keys/keyring.c *_edit = edit; edit 1515 security/keys/keyring.c struct assoc_array_edit *edit) edit 1518 security/keys/keyring.c if (edit) edit 1519 security/keys/keyring.c assoc_array_cancel_edit(edit); edit 1542 security/keys/keyring.c struct assoc_array_edit *edit = NULL; edit 1552 security/keys/keyring.c ret = __key_unlink_begin(keyring, key, &edit); edit 1554 security/keys/keyring.c __key_unlink(keyring, key, &edit); edit 1555 security/keys/keyring.c __key_unlink_end(keyring, key, edit); edit 1644 security/keys/keyring.c struct assoc_array_edit *edit; edit 1652 security/keys/keyring.c edit = assoc_array_clear(&keyring->keys, &keyring_assoc_array_ops); edit 1653 security/keys/keyring.c if (IS_ERR(edit)) { edit 1654 security/keys/keyring.c ret = PTR_ERR(edit); edit 1656 security/keys/keyring.c if (edit) edit 1657 security/keys/keyring.c assoc_array_apply_edit(edit); edit 1674 security/keys/keyring.c struct assoc_array_edit *edit; edit 1676 security/keys/keyring.c edit = assoc_array_clear(&keyring->keys, &keyring_assoc_array_ops); edit 1677 security/keys/keyring.c if (!IS_ERR(edit)) { edit 1678 security/keys/keyring.c if (edit) edit 1679 security/keys/keyring.c assoc_array_apply_edit(edit); edit 372 security/keys/request_key.c struct assoc_array_edit *edit = NULL; edit 404 security/keys/request_key.c ret = __key_link_begin(dest_keyring, &ctx->index_key, &edit); edit 421 security/keys/request_key.c __key_link(key, &edit); edit 425 security/keys/request_key.c __key_link_end(dest_keyring, &ctx->index_key, edit); edit 440 security/keys/request_key.c __key_link(key, &edit); edit 441 security/keys/request_key.c __key_link_end(dest_keyring, &ctx->index_key, edit); edit 457 security/keys/request_key.c __key_link_end(dest_keyring, &ctx->index_key, edit);