summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index e407ab74d..da0444a10 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -357,7 +357,7 @@ syncenv_scale (struct syncenv *env)
if (env->procs > env->runcount)
goto unlock;
- thmax = max (env->runcount, SYNCENV_PROC_MAX);
+ thmax = min (env->runcount, SYNCENV_PROC_MAX);
for (i = env->procs; i < thmax; i++) {
env->proc[i].env = env;
ret = pthread_create (&env->proc[i].processor, NULL,