/* purge cache */
mutex_lock(&db->cache_lock);
- hash_for_each_safe(db->send_access_hash, i, tmp, ce, hentry) {
+ hash_for_each_safe(db->talk_access_hash, i, tmp, ce, hentry) {
hash_del(&ce->hentry);
kfree(ce);
}
return -ENOMEM;
hash_init(d->entries_hash);
- hash_init(d->send_access_hash);
+ hash_init(d->talk_access_hash);
mutex_init(&d->entries_lock);
mutex_init(&d->cache_lock);
hash ^= hash_ptr(conn_dst, KDBUS_POLICY_HASH_SIZE);
mutex_lock(&db->cache_lock);
- hash_for_each_possible(db->send_access_hash, ce, hentry, hash)
+ hash_for_each_possible(db->talk_access_hash, ce, hentry, hash)
if (ce->conn_a == conn_src && ce->conn_b == conn_dst) {
mutex_unlock(&db->cache_lock);
return 0;
}
mutex_lock(&db->cache_lock);
- hash_add(db->send_access_hash, &ce->hentry, hash);
+ hash_add(db->talk_access_hash, &ce->hentry, hash);
mutex_unlock(&db->cache_lock);
}
int i;
mutex_lock(&db->cache_lock);
- hash_for_each_safe(db->send_access_hash, i, tmp, ce, hentry)
+ hash_for_each_safe(db->talk_access_hash, i, tmp, ce, hentry)
if (ce->conn_a == conn || ce->conn_b == conn) {
hash_del(&ce->hentry);
kfree(ce);
/**
* struct kdbus_policy_db - policy database
* @entries_hash: Hashtable of entries
- * @send_access_hash: Hashtable of send access elements
+ * @talk_access_hash: Hashtable of send access elements
* @entries_lock: Mutex to protect the database's access entries
* @cache_lock: Mutex to protect the database's cache
*/
struct kdbus_policy_db {
DECLARE_HASHTABLE(entries_hash, 6);
- DECLARE_HASHTABLE(send_access_hash, 6);
+ DECLARE_HASHTABLE(talk_access_hash, 6);
struct mutex entries_lock;
struct mutex cache_lock;
};