X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Flocal_storage.c;h=05132b0f83dd1d6ecb6ec66dc28958101f1e91cd;hb=151f5322d30ec52a1b99c852e5adbdbbe6fc7e08;hp=b27ef92bad95fe25aad3f1b63c3da53e02d20468;hpb=697dcf4e87f2dbebe57f3ccb9c0b0962b89cf1b4;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/local_storage.c b/lustre/obdclass/local_storage.c index b27ef92..05132b0 100644 --- a/lustre/obdclass/local_storage.c +++ b/lustre/obdclass/local_storage.c @@ -47,7 +47,7 @@ static int ls_object_init(const struct lu_env *env, struct lu_object *o, ENTRY; - ls = container_of0(o->lo_dev, struct ls_device, ls_top_dev.dd_lu_dev); + ls = container_of(o->lo_dev, struct ls_device, ls_top_dev.dd_lu_dev); under = &ls->ls_osd->dd_lu_dev; below = under->ld_ops->ldo_object_alloc(env, o->lo_header, under); if (below == NULL) @@ -65,7 +65,8 @@ static void ls_object_free(const struct lu_env *env, struct lu_object *o) dt_object_fini(&obj->ls_obj); lu_object_header_fini(h); - OBD_FREE_PTR(obj); + OBD_FREE_PRE(obj, sizeof(*obj), "kfreed"); + kfree_rcu(obj, ls_header.loh_rcu); } static struct lu_object_operations ls_lu_obj_ops = { @@ -502,7 +503,7 @@ struct dt_object *local_file_find_or_create_with_fid(const struct lu_env *env, ls = ls_device_get(dt); if (IS_ERR(ls)) { - dto = ERR_PTR(PTR_ERR(ls)); + dto = ERR_CAST(ls); } else { /* create the object */ dti->dti_attr.la_valid = LA_MODE; @@ -597,7 +598,7 @@ local_index_find_or_create_with_fid(const struct lu_env *env, ls = ls_device_get(dt); if (IS_ERR(ls)) { - dto = ERR_PTR(PTR_ERR(ls)); + dto = ERR_CAST(ls); } else { /* create the object */ dti->dti_attr.la_valid = LA_MODE; @@ -719,7 +720,6 @@ void dt_los_put(struct local_oid_storage *los) /* should never happen, only local_oid_storage_fini should * drop refcount to zero */ LBUG(); - return; } /* after Lustre 2.3 release there may be old file to store last generated FID