From dffbba9abaeadd63ab765234a91d271410e16bc6 Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Mon, 16 Aug 2010 15:58:06 +0400 Subject: [PATCH] b=23196 take lov reference in lov_quota_check i=Johann Lombardi i=ZhiYong Tian --- lustre/quota/quota_check.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index 1961e40..c6e8daa 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -298,10 +298,13 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, 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; } } @@ -313,5 +316,8 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, rc = err; } +out: + obd_putref(obd); + RETURN(rc); } -- 1.8.3.1