Skip to content
Snippets Groups Projects
Commit e9064d42 authored by Morris Jette's avatar Morris Jette
Browse files

Merge branch 'slurm-2.3'

parents eb21dc61 d53b7c26
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,6 @@ static void *_set_db_inx_thread(void *no_data) ...@@ -202,9 +202,6 @@ static void *_set_db_inx_thread(void *no_data)
{ {
struct job_record *job_ptr = NULL; struct job_record *job_ptr = NULL;
ListIterator itr; ListIterator itr;
/* Read lock on jobs */
slurmctld_lock_t job_read_lock =
{ NO_LOCK, READ_LOCK, NO_LOCK, NO_LOCK };
/* Write lock on jobs */ /* Write lock on jobs */
slurmctld_lock_t job_write_lock = slurmctld_lock_t job_write_lock =
{ NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK }; { NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK };
...@@ -235,7 +232,7 @@ static void *_set_db_inx_thread(void *no_data) ...@@ -235,7 +232,7 @@ static void *_set_db_inx_thread(void *no_data)
* job db_index here we use a read lock since the * job db_index here we use a read lock since the
* data isn't that sensitive and will only be updated * data isn't that sensitive and will only be updated
* later in this function. */ * later in this function. */
lock_slurmctld(job_read_lock); lock_slurmctld(job_write_lock);
itr = list_iterator_create(job_list); itr = list_iterator_create(job_list);
while ((job_ptr = list_next(itr))) { while ((job_ptr = list_next(itr))) {
if (!job_ptr->db_index) { if (!job_ptr->db_index) {
...@@ -275,7 +272,7 @@ static void *_set_db_inx_thread(void *no_data) ...@@ -275,7 +272,7 @@ static void *_set_db_inx_thread(void *no_data)
} }
} }
list_iterator_destroy(itr); list_iterator_destroy(itr);
unlock_slurmctld(job_read_lock); unlock_slurmctld(job_write_lock);
if (local_job_list) { if (local_job_list) {
slurmdbd_msg_t req, resp; slurmdbd_msg_t req, resp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment