From: Andrew Perepechko Date: Sun, 27 Jun 2010 18:27:17 +0000 (+0400) Subject: b=23196 obd reference fixes in lov_quota_check X-Git-Tag: v1_8_3_57~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=62910816af891615ba62719caef65e5ee0ea8e4b;p=fs%2Flustre-release.git b=23196 obd reference fixes in lov_quota_check i=Johann Lombardi --- diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index 4368db4..a689d00 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -246,10 +246,13 @@ int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) 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; } } @@ -261,5 +264,8 @@ int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) rc = err; } +out: + obd_putref(obd); + RETURN(rc); }