]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ubik: Initialise global version lock before use
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 4 Jun 2011 15:41:41 +0000 (16:41 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 5 Jun 2011 13:00:28 +0000 (06:00 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/ubik/ubik.c

index 14992daba72bfc599195ac4a7a9c817beee8f96f..dd55ac89137f95d725e11c6a2ca78877019475a7 100644 (file)
@@ -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