From 91be6ee258c43a266dbed2e160a6def788b895e7 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 4 Apr 2008 20:22:33 +0000
Subject: [PATCH] relocate a line to fix a bug in will_run logic with backfill

---
 src/plugins/select/cons_res/select_cons_res.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c
index 191313a6d2d..c37d77152f3 100644
--- a/src/plugins/select/cons_res/select_cons_res.c
+++ b/src/plugins/select/cons_res/select_cons_res.c
@@ -2320,6 +2320,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 		saved_state = job->state;
 		_rm_job_from_nodes(exp_node_cr, job, "_will_run_test", 1);
 		job->state = saved_state;
+		bit_or(bitmap, orig_map);
 		rc = _job_test(job_ptr, bitmap, min_nodes, max_nodes, 
 			       req_nodes, SELECT_MODE_WILL_RUN, job_node_req,
 			       exp_node_cr);
@@ -2327,7 +2328,6 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap,
 			job_ptr->start_time = tmp_job_ptr->end_time;
 			break;
 		}
-		bit_or(bitmap, orig_map);
 	}
 	list_iterator_destroy(job_iterator);
 	list_destroy(cr_job_list);
-- 
GitLab