class_export_get(export);
}
+static struct portals_handle_ops export_handle_ops = {
+ .hop_addref = export_handle_addref,
+ .hop_free = NULL,
+};
+
struct obd_export *class_export_get(struct obd_export *exp)
{
cfs_atomic_inc(&exp->exp_refcount);
CFS_INIT_LIST_HEAD(&export->exp_req_replay_queue);
CFS_INIT_LIST_HEAD(&export->exp_handle.h_link);
CFS_INIT_LIST_HEAD(&export->exp_hp_rpcs);
- class_handle_hash(&export->exp_handle, export_handle_addref);
- export->exp_last_request_time = cfs_time_current_sec();
+ class_handle_hash(&export->exp_handle, &export_handle_ops);
+ export->exp_last_request_time = cfs_time_current_sec();
cfs_spin_lock_init(&export->exp_lock);
cfs_spin_lock_init(&export->exp_rpc_lock);
CFS_INIT_HLIST_NODE(&export->exp_uuid_hash);
class_import_get(import);
}
+static struct portals_handle_ops import_handle_ops = {
+ .hop_addref = import_handle_addref,
+ .hop_free = NULL,
+};
+
struct obd_import *class_import_get(struct obd_import *import)
{
cfs_atomic_inc(&import->imp_refcount);
cfs_atomic_set(&imp->imp_inval_count, 0);
CFS_INIT_LIST_HEAD(&imp->imp_conn_list);
CFS_INIT_LIST_HEAD(&imp->imp_handle.h_link);
- class_handle_hash(&imp->imp_handle, import_handle_addref);
+ class_handle_hash(&imp->imp_handle, &import_handle_ops);
init_imp_at(&imp->imp_at);
/* the default magic is V2, will be used in connect RPC, and