summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c18
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c2
2 files changed, 4 insertions, 16 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7359040f18c..bcee5fbd862 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2766,14 +2766,7 @@ glusterd_snap_volume_remove (dict_t *rsp_dict,
origin_vol->snap_count--;
}
- ret = glusterd_volinfo_delete (snap_vol);
- if (ret) {
- gf_log(this->name, GF_LOG_WARNING, "Failed to remove volinfo "
- "%s ", snap_vol->volname);
- save_ret = ret;
- if (!force)
- goto out;
- }
+ glusterd_volinfo_unref (snap_vol);
if (save_ret)
ret = save_ret;
@@ -7906,12 +7899,7 @@ glusterd_snapshot_revert_partial_restored_vol (glusterd_volinfo_t *volinfo)
/* Since we retrieved the volinfo from store now we don't
* want the older volinfo. Therefore delete the older volinfo */
- ret = glusterd_volinfo_delete (volinfo);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Failed to delete volinfo");
- goto out;
- }
-
+ glusterd_volinfo_unref (volinfo);
ret = 0;
out:
return ret;
@@ -7995,7 +7983,7 @@ glusterd_snapshot_restore_postop (dict_t *dict, int32_t op_ret,
ret = dict_get_str (dict, "snapname", &name);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "getting the snap "
- "name failed (volume: %s)", volinfo->volname);
+ "name failed (volume: %s)", name);
goto out;
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 07f47cf9d6e..c3d651e559b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -3001,7 +3001,7 @@ glusterd_store_retrieve_volume (char *volname, glusterd_snap_t *snap)
out:
if (ret) {
if (volinfo)
- glusterd_volinfo_delete (volinfo);
+ glusterd_volinfo_unref (volinfo);
volinfo = NULL;
}