summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-12-10 13:28:17 +0100
committerVijay Bellur <vbellur@redhat.com>2014-12-17 09:14:51 -0800
commit531e0a70ff7a7b87baf0a8886d1de880293c3fcb (patch)
treed89dfb701d619581ac09fb44f64fcd4c62952055 /xlators/cluster/ec/src
parent3abee447da0adcaba4d02f212deb0d45b5b7e2e7 (diff)
ec: Fix more mutex related coverity scan issues
This patch solves CID 1257622. Change-Id: I95680c7de49cd84011d2ad38f02e5fad82e15c90 BUG: 1170254 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/9263 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src')
-rw-r--r--xlators/cluster/ec/src/ec-combine.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/xlators/cluster/ec/src/ec-combine.c b/xlators/cluster/ec/src/ec-combine.c
index a98380adfb8..e605f7ba567 100644
--- a/xlators/cluster/ec/src/ec-combine.c
+++ b/xlators/cluster/ec/src/ec-combine.c
@@ -851,12 +851,9 @@ void ec_combine(ec_cbk_data_t * cbk, ec_combine_f combine)
ec_trace("ANSWER", fop, "combine=%s[%d]",
ec_bin(str, sizeof(str), cbk->mask, 0), cbk->count);
- if ((cbk->count == fop->expected) && (fop->answer == NULL))
- {
+ if ((cbk->count == fop->expected) && (fop->answer == NULL)) {
fop->answer = cbk;
- ec_update_bad(fop, cbk->mask);
-
resume = 1;
}
@@ -865,12 +862,11 @@ void ec_combine(ec_cbk_data_t * cbk, ec_combine_f combine)
UNLOCK(&fop->lock);
- if (needed > 0)
- {
+ if (needed > 0) {
ec_dispatch_next(fop, cbk->idx);
- }
- else if (resume)
- {
+ } else if (resume) {
+ ec_update_bad(fop, cbk->mask);
+
ec_resume(fop, 0);
}
}