From: tianzy Date: Wed, 21 Jan 2009 02:56:54 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: GIT_EPOCH_B1_6~2^5~238 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=aaea155cfbf114e14d6ad7896711212f94bf028a;p=fs%2Flustre-release.git Branch b1_6 take refcount of export when quotacheck is going on b=18126 i=shadow i=panda --- diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index 5fbd4a7..5ad5dea 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -111,6 +111,7 @@ static int target_quotacheck_thread(void *data) pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); rc = target_quotacheck_callback(exp, oqctl); + class_export_put(exp); atomic_inc(qta->qta_sem); @@ -151,6 +152,9 @@ int target_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) } } + /* we get ref for exp because target_quotacheck_callback() will use this + * export later b=18126 */ + class_export_get(exp); rc = kernel_thread(target_quotacheck_thread, qta, CLONE_VM|CLONE_FILES); if (rc >= 0) { CDEBUG(D_INFO, "%s: target_quotacheck_thread: %d\n", @@ -158,6 +162,7 @@ int target_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) RETURN(0); } + class_export_put(exp); CERROR("%s: error starting quotacheck_thread: %d\n", obd->obd_name, rc); OBD_FREE_PTR(qta);