summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-nfs-svc.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-nfs-svc.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
index 49b1b561701..cb08a208101 100644
--- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
@@ -164,18 +164,15 @@ glusterd_nfssvc_manager (glusterd_svc_t *svc, void *data, int flags)
{
int ret = -1;
- if (glusterd_are_all_volumes_stopped ()) {
- ret = svc->stop (svc, SIGKILL);
-
- } else {
- ret = glusterd_nfssvc_create_volfile ();
- if (ret)
- goto out;
+ ret = svc->stop (svc, SIGKILL);
+ if (ret)
+ goto out;
- ret = svc->stop (svc, SIGKILL);
- if (ret)
- goto out;
+ ret = glusterd_nfssvc_create_volfile ();
+ if (ret)
+ goto out;
+ if (glusterd_nfssvc_need_start ()) {
ret = svc->start (svc, flags);
if (ret)
goto out;
@@ -193,8 +190,7 @@ out:
int
glusterd_nfssvc_start (glusterd_svc_t *svc, int flags)
{
- if (glusterd_nfssvc_need_start ())
- return glusterd_svc_start (svc, flags, NULL);
+ return glusterd_svc_start (svc, flags, NULL);
return 0;
}