int i, rc = 0;
ENTRY;
+ obd_getref(obd);
+
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) {
CERROR("lov idx %d inactive\n", i);
- RETURN(-EIO);
+ rc = -EIO;
+ goto out;
}
}
rc = err;
}
+out:
+ obd_putref(obd);
+
RETURN(rc);
}