* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
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) {
+ if (!lov->lov_tgts[i])
+ continue;
+
+ if (!lov->lov_tgts[i]->ltd_active) {
CERROR("lov idx %d inactive\n", i);
- RETURN(-EIO);
+ rc = -EIO;
+ goto out;
}
}
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
int err;
+ if (!lov->lov_tgts[i])
+ continue;
+
err = obd_quotacheck(lov->lov_tgts[i]->ltd_exp, oqctl);
if (err && !rc)
rc = err;
}
+out:
+ obd_putref(obd);
+
RETURN(rc);
}