list_for_each_entry(n, &lo->lo_header->loh_layers, lo_linkage) {
if (n->lo_dev == &dev->dd_lu_dev)
- return container_of0(n, struct dt_object, do_lu);
+ return container_of(n, struct dt_object, do_lu);
}
lu_object_put(env, lo);
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)
static inline struct ls_device *dt2ls_dev(struct dt_device *d)
{
- return container_of0(d, struct ls_device, ls_top_dev);
+ return container_of_safe(d, struct ls_device, ls_top_dev);
}
struct ls_object {
static inline struct ls_object *lu2ls_obj(struct lu_object *o)
{
- return container_of0(o, struct ls_object, ls_obj.do_lu);
+ return container_of_safe(o, struct ls_object, ls_obj.do_lu);
}
static inline struct dt_object *ls_locate(const struct lu_env *env,
* lives as long as possible and ->loo_object_free() methods
* can look at its contents.
*/
- o = container_of0(splice.prev, struct lu_object, lo_linkage);
+ o = container_of(splice.prev, struct lu_object, lo_linkage);
list_del_init(&o->lo_linkage);
LASSERT(o->lo_ops->loo_object_free != NULL);
o->lo_ops->loo_object_free(env, o);
return ERR_PTR(-ENOENT);
}
- h = container_of0(hnode, struct lu_object_header, loh_hash);
+ h = container_of(hnode, struct lu_object_header, loh_hash);
if (!list_empty(&h->loh_lru)) {
struct lu_site_bkt_data *bkt;
static inline struct dt_device *scrub_obj2dev(struct dt_object *obj)
{
- return container_of0(obj->do_lu.lo_dev, struct dt_device, dd_lu_dev);
+ return container_of_safe(obj->do_lu.lo_dev, struct dt_device,
+ dd_lu_dev);
}
static void scrub_file_to_cpu(struct scrub_file *des, struct scrub_file *src)