From 603008cb068d34055e8cfff993369951f76b2cb5 Mon Sep 17 00:00:00 2001 From: anserper <anserper> Date: Mon, 21 Apr 2008 11:20:39 +0000 Subject: [PATCH] Branch b1_6 b=15218 i=johann i=tianzy additional admin quota file update --- lustre/quota/quota_master.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lustre/quota/quota_master.c b/lustre/quota/quota_master.c index 3d00db5054..31dc70fdc3 100644 --- a/lustre/quota/quota_master.c +++ b/lustre/quota/quota_master.c @@ -1198,7 +1198,7 @@ int mds_set_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl) time_t btime, itime; struct lustre_dquot *dquot; struct obd_dqblk *dqblk = &oqctl->qc_dqblk; - int set, rc, flag = 0; + int set, rc, rc2 = 0, flag = 0; ENTRY; OBD_ALLOC_PTR(oqaq); @@ -1315,21 +1315,22 @@ int mds_set_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl) goto revoke_out; } } - down(&mds->mds_qonoff_sem); revoke_out: + down(&mds->mds_qonoff_sem); + down(&dquot->dq_sem); if (rc) { /* cancel previous setting */ - down(&dquot->dq_sem); dquot->dq_dqb.dqb_ihardlimit = ihardlimit; dquot->dq_dqb.dqb_isoftlimit = isoftlimit; dquot->dq_dqb.dqb_bhardlimit = bhardlimit; dquot->dq_dqb.dqb_bsoftlimit = bsoftlimit; dquot->dq_dqb.dqb_btime = btime; dquot->dq_dqb.dqb_itime = itime; - fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT); - up(&dquot->dq_sem); } + rc2 = fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT); + up(&dquot->dq_sem); + out: down(&dquot->dq_sem); dquot->dq_status &= ~DQ_STATUS_SET; @@ -1342,7 +1343,7 @@ out_sem: if (oqaq) OBD_FREE_PTR(oqaq); - return rc; + return rc ? rc : rc2; } static int mds_get_space(struct obd_device *obd, struct obd_quotactl *oqctl) -- GitLab