diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-04-08 18:54:46 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-04-11 15:19:30 +0000 |
commit | 7108913337f24d3d7a39d919a29872fe50072cf4 (patch) | |
tree | 826ecbcb91847225db611e6da5ea5767fab59b97 /xlators/mgmt/glusterd/src/glusterd-snapshot.c | |
parent | 35dd17e222fe172866e15824e5ac9d242382178c (diff) |
glusterd: remove glusterd_check_volume_exists() call
As the same functionality is covered in glusterd_volinfo_find
Updates: bz#1193929
Change-Id: I2308c5fa9b2ca9edaa95f172d0bd914103808c36
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 8f5cd6de2aa..abbcb6288f4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -2247,6 +2247,7 @@ glusterd_snapshot_clone_prevalidate(dict_t *dict, char **op_errstr, xlator_t *this = NULL; uuid_t *snap_volid = NULL; gf_loglevel_t loglevel = GF_LOG_ERROR; + glusterd_volinfo_t *volinfo = NULL; this = THIS; GF_ASSERT(op_errstr); @@ -2267,7 +2268,8 @@ glusterd_snapshot_clone_prevalidate(dict_t *dict, char **op_errstr, goto out; } - if (glusterd_check_volume_exists(clonename)) { + ret = glusterd_volinfo_find(clonename, &volinfo); + if (!ret) { ret = -1; snprintf(err_str, sizeof(err_str), "Volume with name:%s " |