summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e27d2209f44..d2305df1ee3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -756,14 +756,19 @@ glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path,
gf_log (THIS->name, GF_LOG_ERROR,
"given path %s lies within brick %s",
path, brickiter->path);
+ *brickinfo = brickiter;
+ ret = 0;
+ break;
} else if (path[smaller_path] == '/') {
gf_log (THIS->name, GF_LOG_ERROR,
"brick %s is a part of %s",
brickiter->path, path);
+ *brickinfo = brickiter;
+ ret = 0;
+ break;
+ } else {
+ ret = -1;
}
- *brickinfo = brickiter;
- ret = 0;
- break;
}
}