Lines Matching +full:unlock +full:- +full:keys
1 /* SPDX-License-Identifier: GPL-2.0 */
22 * keys
38 * struct batadv_hashtable - Wrapper of simple hlist based hashtable
65 * batadv_hash_add() - adds data to the hashtable
73 * and -1 on error.
82 int ret = -1; in batadv_hash_add()
90 index = choose(data, hash->size); in batadv_hash_add()
91 head = &hash->table[index]; in batadv_hash_add()
92 list_lock = &hash->list_locks[index]; in batadv_hash_add()
101 goto unlock; in batadv_hash_add()
106 atomic_inc(&hash->generation); in batadv_hash_add()
110 unlock: in batadv_hash_add()
117 * batadv_hash_remove() - Removes data from hash, if found
139 index = choose(data, hash->size); in batadv_hash_remove()
140 head = &hash->table[index]; in batadv_hash_remove()
142 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove()
149 atomic_inc(&hash->generation); in batadv_hash_remove()
152 spin_unlock_bh(&hash->list_locks[index]); in batadv_hash_remove()