+
+static void
+conn_exit(cfs_hash_t *hs, cfs_hlist_node_t *hnode)
+{
+ struct ptlrpc_connection *conn;
+
+ conn = cfs_hlist_entry(hnode, struct ptlrpc_connection, c_hash);
+ /*
+ * Nothing should be left. Connection user put it and
+ * connection also was deleted from table by this time
+ * so we should have 0 refs.
+ */
+ LASSERTF(cfs_atomic_read(&conn->c_refcount) == 0,
+ "Busy connection with %d refs\n",
+ cfs_atomic_read(&conn->c_refcount));
+ OBD_FREE_PTR(conn);
+}
+
+static cfs_hash_ops_t conn_hash_ops = {
+ .hs_hash = conn_hashfn,
+ .hs_keycmp = conn_keycmp,
+ .hs_key = conn_key,
+ .hs_object = conn_object,
+ .hs_get = conn_get,
+ .hs_put_locked = conn_put_locked,
+ .hs_exit = conn_exit,
+};