233933
From 37bf4daca164cfcb260760ee2fd25d66f920dc7f Mon Sep 17 00:00:00 2001
233933
From: Jiffin Tony Thottan <jthottan@redhat.com>
233933
Date: Wed, 22 Feb 2017 18:26:30 +0530
233933
Subject: [PATCH 064/124] glusterd/ganesha : return proper value in pre_setup()
233933
233933
Label: DOWNSTREAM ONLY
233933
233933
Change-Id: I6f7ce82488904c7d418ee078162f26f1ec81e9d9
233933
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
233933
Reviewed-on: https://review.gluster.org/16733
233933
Smoke: Gluster Build System <jenkins@build.gluster.org>
233933
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
233933
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
233933
Tested-by: Raghavendra Talur <rtalur@redhat.com>
233933
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
233933
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
233933
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
233933
Reviewed-on: https://code.engineering.redhat.com/gerrit/167149
233933
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
233933
Tested-by: RHGS Build Bot <nigelb@redhat.com>
233933
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
233933
---
233933
 xlators/mgmt/glusterd/src/glusterd-ganesha.c | 7 +++----
233933
 1 file changed, 3 insertions(+), 4 deletions(-)
233933
233933
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
233933
index 1c2ba7a..d9fdfc6 100644
233933
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
233933
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
233933
@@ -843,16 +843,15 @@ pre_setup(gf_boolean_t run_setup, char **op_errstr)
233933
 {
233933
     int ret = 0;
233933
 
233933
-    ret = check_host_list();
233933
-
233933
-    if (ret) {
233933
+    if (check_host_list()) {
233933
         ret = setup_cluster(run_setup);
233933
         if (ret == -1)
233933
             gf_asprintf(op_errstr,
233933
                         "Failed to set up HA "
233933
                         "config for NFS-Ganesha. "
233933
                         "Please check the log file for details");
233933
-    }
233933
+    } else
233933
+        ret = -1;
233933
 
233933
     return ret;
233933
 }
233933
-- 
233933
1.8.3.1
233933