summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/cluster-syncop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/cluster-syncop.c')
-rw-r--r--libglusterfs/src/cluster-syncop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/cluster-syncop.c b/libglusterfs/src/cluster-syncop.c
index 98a46c85e4b..36945d69379 100644
--- a/libglusterfs/src/cluster-syncop.c
+++ b/libglusterfs/src/cluster-syncop.c
@@ -31,13 +31,18 @@
if (syncbarrier_init (&__local.barrier)) \
break; \
frame->local = &__local; \
+ for (__i = 0; __i < numsubvols; __i++) { \
+ if (on[__i]) { \
+ __count++; \
+ } \
+ } \
+ __local.barrier.waitfor = __count; \
for (__i = 0; __i < numsubvols; __i++) { \
if (!on[__i]) \
continue; \
STACK_WIND_COOKIE (frame, cluster_##fop##_cbk, \
(void *)(long) __i, subvols[__i], \
subvols[__i]->fops->fop, args); \
- __count++; \
} \
syncbarrier_wait (&__local.barrier, __count); \
syncbarrier_destroy (&__local.barrier); \