diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 2576d5557f2ff1fa36926a49d198e91f3e0f05ac..212e3c9fdc69ccf8a868891847dd401eeadc4bf1 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -1733,7 +1733,7 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) } } - /* Sort the list of jobs in descending order */ + /* Sort the list of node counts in order descending size */ if (resv_desc_ptr->node_cnt) { for (i = 0; resv_desc_ptr->node_cnt[i]; i++) { int max_inx = i; @@ -3140,13 +3140,14 @@ static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, bit_and(node_bitmap, avail_node_bitmap); } - /* If *resv_bitmap exists we probably don't need to delete it, - when it gets created off of node_bitmap it will be the - same, but just to be safe we do. */ + /* If *resv_bitmap exists we probably don't need to delete it, when it + * gets created off of node_bitmap it will be the same, but just to be + * safe we do. */ FREE_NULL_BITMAP(*resv_bitmap); - if (rc == SLURM_SUCCESS) + if (rc == SLURM_SUCCESS) { *resv_bitmap = _pick_idle_nodes(node_bitmap, resv_desc_ptr, core_bitmap); + } FREE_NULL_BITMAP(node_bitmap); if (*resv_bitmap == NULL) { if (rc == SLURM_SUCCESS) @@ -3154,8 +3155,7 @@ static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, return rc; } - /* Same thing as the *resv_bitmap, might as well keep them in - sync */ + /* Same thing as the *resv_bitmap, might as well keep them in sync */ xfree(resv_desc_ptr->node_list); resv_desc_ptr->node_list = bitmap2node_name(*resv_bitmap);