From: Simon Wilkinson Date: Sat, 4 Jun 2011 15:41:41 +0000 (+0100) Subject: ubik: Initialise global version lock before use X-Git-Tag: upstream/1.8.0_pre1^2~3702 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=cc72cb1e811f8cffca93c8b15009534cada776ba;p=packages%2Fo%2Fopenafs.git ubik: Initialise global version lock before use Commit e4ac552ab79be21d90397079eaf6be7050497752 introduced a global version lock to ubik, but doesn't initialise this lock before make use of it. On platforms which require that pthread mutexes are initialsed, this causes an assertion failure. Initialise this lock at the same time as we MUTEX_INIT all of our other locks. Change-Id: Ib5ef75d443101a823738fba55c0760cb1848dbcf Reviewed-on: http://gerrit.openafs.org/4780 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman --- diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index 14992daba..dd55ac891 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -414,6 +414,7 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort, MUTEX_INIT(&beacon_globals.beacon_lock, "beacon lock", MUTEX_DEFAULT, 0); MUTEX_INIT(&vote_globals.vote_lock, "vote lock", MUTEX_DEFAULT, 0); MUTEX_INIT(&addr_globals.addr_lock, "address lock", MUTEX_DEFAULT, 0); + MUTEX_INIT(&version_globals.version_lock, "version lock", MUTEX_DEFAULT, 0); #else Lock_Init(&tdb->versionLock); #endif