summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heald.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c
index d89692d3c61..2fc1b633d36 100644
--- a/xlators/cluster/afr/src/afr-self-heald.c
+++ b/xlators/cluster/afr/src/afr-self-heald.c
@@ -435,10 +435,17 @@ afr_shd_index_sweep (struct subvol_healer *healer, char *vgfid)
int ret = 0;
xlator_t *subvol = NULL;
dict_t *xdata = NULL;
+ call_frame_t *frame = NULL;
priv = healer->this->private;
subvol = priv->children[healer->subvol];
+ frame = afr_frame_create (healer->this);
+ if (!frame) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
loc.inode = afr_shd_index_inode (healer->this, subvol, vgfid);
if (!loc.inode) {
gf_msg (healer->this->name, GF_LOG_WARNING,
@@ -454,7 +461,7 @@ afr_shd_index_sweep (struct subvol_healer *healer, char *vgfid)
goto out;
}
- ret = syncop_mt_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
+ ret = syncop_mt_dir_scan (frame, subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
healer, afr_shd_index_heal, xdata,
priv->shd.max_threads, priv->shd.wait_qlength);
@@ -466,6 +473,8 @@ out:
if (xdata)
dict_unref (xdata);
+ if (frame)
+ AFR_STACK_DESTROY (frame);
return ret;
}