summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-04-13 18:37:55 +0530
committerAnand Avati <avati@redhat.com>2012-04-13 10:09:29 -0700
commitdc4c44d51e3eb4b53e78840bf223911e48ce62b5 (patch)
tree28edc63c80cee05f6a5ba363e707c79b620a477e
parent77645c35323c30f881ac5e5418c8723642f3845f (diff)
libglusterfs: Syncop procs should not exceed SYNCENV_PROC_MAX
Change-Id: I0eb2adac06eae31939c8ed6b544b4be43d1a5885 BUG: 810109 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3146 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-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,