Blame SOURCES/0039-RH-detect-prio-fix.patch

671555
---
671555
 libmultipath/propsel.c |   11 +++++++++--
671555
 1 file changed, 9 insertions(+), 2 deletions(-)
671555
671555
Index: multipath-tools-130222/libmultipath/propsel.c
671555
===================================================================
671555
--- multipath-tools-130222.orig/libmultipath/propsel.c
671555
+++ multipath-tools-130222/libmultipath/propsel.c
671555
@@ -384,10 +384,17 @@ select_getuid (struct path * pp)
671555
 void
671555
 detect_prio(struct path * pp)
671555
 {
671555
+	int ret;
671555
 	struct prio *p = &pp->prio;
671555
 
671555
-	if (get_target_port_group_support(pp->fd) > 0)
671555
-		prio_get(p, PRIO_ALUA, DEFAULT_PRIO_ARGS);
671555
+	if (get_target_port_group_support(pp->fd) <= 0)
671555
+		return;
671555
+	ret = get_target_port_group(pp->fd);
671555
+	if (ret < 0)
671555
+		return;
671555
+	if (get_asymmetric_access_state(pp->fd, ret) < 0)
671555
+		return;
671555
+	prio_get(p, PRIO_ALUA, DEFAULT_PRIO_ARGS);
671555
 }
671555
 
671555
 extern int