int lovsub_object_init(const struct lu_env *env, struct lu_object *obj, const struct lu_object_conf *conf) { struct lovsub_device *dev = lu2lovsub_dev(obj->lo_dev); struct lu_object *below; struct lu_device *under; int result; under = &dev->acid_next->cd_lu_dev; below = under->ld_ops->ldo_object_alloc(env, obj->lo_header, under); if (below) { lu_object_add(obj, below); cl_object_page_init(lu2cl(obj), sizeof(struct lovsub_page)); result = 0; } else { result = -ENOMEM; } return result; }
static int vvp_object_init(const struct lu_env *env, struct lu_object *obj, const struct lu_object_conf *conf) { struct vvp_device *dev = lu2vvp_dev(obj->lo_dev); struct vvp_object *vob = lu2vvp(obj); struct lu_object *below; struct lu_device *under; int result; under = &dev->vdv_next->cd_lu_dev; below = under->ld_ops->ldo_object_alloc(env, obj->lo_header, under); if (below != NULL) { const struct cl_object_conf *cconf; cconf = lu2cl_conf(conf); lu_object_add(obj, below); result = vvp_object_init0(env, vob, cconf); } else result = -ENOMEM; return result; }