RETURN(-ENODEV);
}
- rc = lu_env_refill((struct lu_env *)env);
- if (rc != 0) {
- CERROR("Failure to refill session: '%d'\n", rc);
- GOTO(out_type, rc);
- }
-
ldt = type->typ_lu;
if (ldt == NULL) {
CERROR("type: '%s'\n", s2lsi(lmi->lmi_sb)->lsi_osd_type);
"%s-osd", lustre_cfg_string(cfg, 0));
type->typ_refcnt++;
+
+ rc = lu_env_refill((struct lu_env *)env);
+ if (rc != 0) {
+ CERROR("Failure to refill session: '%d'\n", rc);
+ GOTO(out_free, rc);
+ }
+
rc = ldt->ldt_ops->ldto_device_init(env, d, dev, NULL);
if (rc) {
CERROR("can't init device '%s', rc = %d\n",