From 3527881f091e36fac0456bae3831b39adef1bcfc Mon Sep 17 00:00:00 2001
From: Dominik Bartkiewicz <bart@schedmd.com>
Date: Fri, 8 Sep 2017 10:57:35 +0200
Subject: [PATCH] remove redundant PART_FLAG_REQ_RESV check from
 _part_access_check()

---
 src/slurmctld/job_mgr.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index aff140605ed..8bb9ebc753f 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -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 "
-- 
GitLab