Patchwork [BRANCH:release-3.1,BUG:3003,1/1] mgmt/glusterd: Set the generic options in the graph before merging it with the parent graph while building nfs-server volfile.

login
register
Submitter Mohammed Junaid Ahmed
Date 2011-06-13 06:21:38
Message ID <1307946098-32475-1-git-send-email-junaid@gluster.com>
Download mbox | patch
Permalink /patch/7466/
State Accepted
Delegated to: Pranith K
Headers show

Comments

Mohammed Junaid Ahmed - 2011-06-13 06:21:38
From: Junaid <junaid@gluster.com>


Signed-off-by: Junaid <junaid@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-volgen.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 89a6f8d..0a20eee 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1674,20 +1674,20 @@  build_nfs_graph (glusterfs_graph_t *graph, dict_t *mod_dict)
                 memset (&cgraph, 0, sizeof (cgraph));
                 ret = build_client_graph (&cgraph, voliter, mod_dict);
                 if (ret)
-                        goto out;;
-                ret = volgen_graph_merge_sub (graph, &cgraph);
-                if (ret)
                         goto out;
 
                 if (mod_dict) {
                         dict_copy (mod_dict, set_dict);
-                        ret = volgen_graph_set_options_generic (graph, set_dict, voliter,
-                                                        nfs_spec_option_handler);
+                        ret = volgen_graph_set_options_generic (&cgraph, set_dict, voliter,
+                                                                nfs_spec_option_handler);
+                } else {
+                        ret = volgen_graph_set_options_generic (&cgraph, voliter->dict, voliter,
+                                                                nfs_spec_option_handler);
                 }
-                else
-                        ret = volgen_graph_set_options_generic (graph, voliter->dict, voliter,
-                                                        nfs_spec_option_handler);
 
+                ret = volgen_graph_merge_sub (graph, &cgraph);
+                if (ret)
+                        goto out;
         }