.ldt_ops = &ls_device_type_ops,
};
-static struct ls_device *ls_device_get(const struct lu_env *env,
- struct dt_device *dev)
+struct ls_device *ls_device_get(struct dt_device *dev)
{
struct ls_device *ls;
RETURN(ls);
}
-static void ls_device_put(const struct lu_env *env, struct ls_device *ls)
+void ls_device_put(const struct lu_env *env, struct ls_device *ls)
{
LASSERT(env);
if (!cfs_atomic_dec_and_test(&ls->ls_refcount))
} else {
struct ls_device *ls;
- ls = ls_device_get(env, dt);
+ ls = ls_device_get(dt);
if (IS_ERR(ls)) {
dto = ERR_PTR(PTR_ERR(ls));
} else {
} else {
struct ls_device *ls;
- ls = ls_device_get(env, dt);
+ ls = ls_device_get(dt);
if (IS_ERR(ls)) {
dto = ERR_PTR(PTR_ERR(ls));
} else {
}
EXPORT_SYMBOL(local_index_find_or_create_with_fid);
-static struct local_oid_storage *dt_los_find(struct ls_device *ls, __u64 seq)
+struct local_oid_storage *dt_los_find(struct ls_device *ls, __u64 seq)
{
struct local_oid_storage *los, *ret = NULL;
return ret;
}
+void dt_los_put(struct local_oid_storage *los)
+{
+ if (cfs_atomic_dec_and_test(&los->los_refcount))
+ /* should never happen, only local_oid_storage_fini should
+ * drop refcount to zero */
+ LBUG();
+ return;
+}
+
/**
* Initialize local OID storage for required sequence.
* That may be needed for services that uses local files and requires
ENTRY;
- ls = ls_device_get(env, dev);
+ ls = ls_device_get(dev);
if (IS_ERR(ls))
RETURN(PTR_ERR(ls));