Skip to content
Snippets Groups Projects
Commit 3527881f authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz
Browse files

remove redundant PART_FLAG_REQ_RESV check from _part_access_check()

parent e69449b6
No related branches found
No related tags found
No related merge requests found
......@@ -5620,23 +5620,8 @@ static int _part_access_check(struct part_record *part_ptr,
{
uint32_t total_nodes, min_nodes_tmp, max_nodes_tmp;
uint32_t job_min_nodes, job_max_nodes;
size_t resv_name_leng = 0;
int rc = SLURM_SUCCESS;
 
if (job_desc->reservation != NULL) {
resv_name_leng = strlen(job_desc->reservation);
}
if ((part_ptr->flags & PART_FLAG_REQ_RESV) &&
((job_desc->reservation == NULL) ||
(resv_name_leng == 0))) {
info("%s: uid %u access to partition %s "
"denied, requires reservation", __func__,
(unsigned int) submit_uid, part_ptr->name);
return ESLURM_ACCESS_DENIED;
}
if ((part_ptr->flags & PART_FLAG_REQ_RESV) &&
(!job_desc->reservation || !strlen(job_desc->reservation))) {
info("%s: uid %u access to partition %s "
......
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