Whamcloud - gitweb
LU-7330 ldlm: fix race of starting bl threads 26/17026/2
authorNiu Yawei <yawei.niu@intel.com>
Tue, 3 Nov 2015 06:59:32 +0000 (01:59 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Nov 2015 15:53:51 +0000 (15:53 +0000)
commitebda41d8de7956f19fd27f86208c668e43c6957c
treea60327ccfb0c3561797d063c4e5ee0942d3a8e3e
parent42e786f742fa3d13f7d6b66afaba63e77707015c
LU-7330 ldlm: fix race of starting bl threads

There is race in the code of starting bl threads which leads to
thread number exceeds the maximum number when race happened, it
can also lead to duplicated thread name.

This patch fixes the race and cleanup the code a bit.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9c9be125d1d76890b8c52476684976dad3cb3d87
Reviewed-on: http://review.whamcloud.com/17026
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ldlm/ldlm_lockd.c