From dc4c44d51e3eb4b53e78840bf223911e48ce62b5 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 13 Apr 2012 18:37:55 +0530 Subject: libglusterfs: Syncop procs should not exceed SYNCENV_PROC_MAX Change-Id: I0eb2adac06eae31939c8ed6b544b4be43d1a5885 BUG: 810109 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3146 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/syncop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/syncop.c') diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index e407ab74d6f..da0444a109a 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, -- cgit