summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-entry.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2015-03-11 16:41:06 +0530
committerNiels de Vos <ndevos@redhat.com>2015-03-11 21:14:38 -0700
commit147b3871180a699a642767d0cc0ea00fa69a33c8 (patch)
tree0671c7954f3fdc59c73a356649a7c403c0d0ff89 /xlators/cluster/afr/src/afr-self-heal-entry.c
parent526448e784317e3c9ec72e1641f82b28959b696d (diff)
afr: exit out of stack winds in for loops if call_count is zero
....in order to avoid a race where the fop cbk frees the frame's local variables and the fop tries to access it at a later point in time. Change-Id: I91d2696e5e183c61ea1368b3a538f9ed7f3851de BUG: 1200764 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/9856 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: pranith karampuri <pranith.k@gmail.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 95398cc..aa4aa4d 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -982,9 +982,9 @@ afr_sh_entry_impunge_setattr (call_frame_t *impunge_frame, xlator_t *this)
priv->children[i]->fops->setattr,
&impunge_local->loc,
&impunge_sh->entrybuf, valid, NULL);
- call_count--;
+ if (!--call_count)
+ break;
}
- GF_ASSERT (!call_count);
return 0;
out:
if (setattr_frame)