From 623487e10a6c25109e238411ba5cefc8493f193e Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Thu, 16 Mar 2017 15:33:12 -0600
Subject: [PATCH] Revert "Fix regression in 16.05.10 with respects to
 GrpTresMins on a QOS or"

This reverts commit af52111ceb93a6c83ca3b7b11c5ea383fc339a38.
---
 NEWS                        |  2 --
 src/slurmctld/acct_policy.c | 14 +++++++-------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/NEWS b/NEWS
index 43878af3fe1..f12c73f4cf3 100644
--- a/NEWS
+++ b/NEWS
@@ -12,8 +12,6 @@ documents those changes that are of interest to users and administrators.
     active features if SyscfgPath is configured in the knl.conf file.
  -- Fix memory error when updating a job's licenses.
  -- Fix double read lock of tres when updating gres or licenses on a job.
- -- Fix regression in 16.05.10 with respects to GrpTresMins on a QOS or
-    Association.
 
 * Changes in Slurm 16.05.10-2
 =============================
diff --git a/src/slurmctld/acct_policy.c b/src/slurmctld/acct_policy.c
index 7725590f0c0..da8298e5662 100644
--- a/src/slurmctld/acct_policy.c
+++ b/src/slurmctld/acct_policy.c
@@ -819,8 +819,8 @@ static bool _validate_tres_limits_for_assoc(
  * IN - tres_limit_array - TRES limits from an association
  * IN - qos_tres_limit_array - TRES limits QOS has imposed already
  * IN - tres_req_cnt - TRES requested from the job
- * IN - tres_usage - TRES usage in use right now by the assoc (running jobs)
- * IN - curr_usage - TRES usage from the association (in minutes)
+ * IN - tres_usage - TRES usage from the association (in minutes)
+ * IN - curr_usage - TRES usage in use right now by the assoc (running jobs)
  * IN - admin_limit_set - TRES limits that have been overridden by an admin
  * IN - safe_limits - if the safe flag was set on AccountingStorageEnforce
  *
@@ -1087,8 +1087,8 @@ static bool _validate_tres_time_limits(
  * IN/OUT - out_tres_limit_array - TRES limits QOS has imposed already, if a new
  *                                 limit is found the limit is filled in.
  * IN - tres_req_cnt - TRES requested from the job
- * IN - tres_usage - TRES usage in use right now by the QOS (running jobs)
- * IN - curr_usage - TRES usage from the QOS (in minutes)
+ * IN - tres_usage - TRES usage from the QOS (in minutes)
+ * IN - curr_usage - TRES usage in use right now by the QOS (running jobs)
  * IN - admin_limit_set - TRES limits that have been overridden by an admin
  * IN - safe_limits - if the safe flag was set on AccountingStorageEnforce
  *
@@ -1761,7 +1761,7 @@ static int _qos_job_runnable_post_select(struct job_record *job_ptr,
 	i = _validate_tres_usage_limits_for_qos(
 		&tres_pos, qos_ptr->grp_tres_mins_ctld,
 		qos_out_ptr->grp_tres_mins_ctld, job_tres_time_limit,
-		tres_run_mins, tres_usage_mins, job_ptr->limit_set.tres,
+		tres_usage_mins, tres_run_mins, job_ptr->limit_set.tres,
 		safe_limits);
 	switch (i) {
 	case 1:
@@ -3063,8 +3063,8 @@ extern bool acct_policy_job_runnable_post_select(
 		i = _validate_tres_usage_limits_for_assoc(
 			&tres_pos, assoc_ptr->grp_tres_mins_ctld,
 			qos_rec.grp_tres_mins_ctld,
-			job_tres_time_limit, tres_run_mins,
-			tres_usage_mins, job_ptr->limit_set.tres,
+			job_tres_time_limit, tres_usage_mins,
+			tres_run_mins, job_ptr->limit_set.tres,
 			safe_limits);
 		switch (i) {
 		case 1:
-- 
GitLab