From: Derrick Brashear Date: Wed, 23 Jan 2008 03:21:45 +0000 (+0000) Subject: DEVEL15-viced-fsync-glock-creation-20080122 X-Git-Tag: openafs-devel-1_5_31~76 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6d0395c1ca668b1dd8117da95f37f2a3be60036d;p=packages%2Fo%2Fopenafs.git DEVEL15-viced-fsync-glock-creation-20080122 LICENSE IPL10 create fsync glock and cond before we initialize volume package. oops? (cherry picked from commit 0e8adf69538638b8caa56d9b1fa72beba74734bd) --- diff --git a/src/viced/viced.c b/src/viced/viced.c index 4bb55c392..0f79df7fb 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -574,11 +574,6 @@ FsyncCheckLWP() setThreadId("FsyncCheckLWP"); -#ifdef AFS_PTHREAD_ENV - assert(pthread_cond_init(&fsync_cond, NULL) == 0); - assert(pthread_mutex_init(&fsync_glock_mutex, NULL) == 0); -#endif - #ifdef AFS_DEMAND_ATTACH_FS FS_STATE_WRLOCK; while (fs_state.mode == FS_MODE_NORMAL) { @@ -2137,6 +2132,11 @@ main(int argc, char *argv[]) /* allow super users to manage RX statistics */ rx_SetRxStatUserOk(fs_rxstat_userok); +#ifdef AFS_PTHREAD_ENV + assert(pthread_cond_init(&fsync_cond, NULL) == 0); + assert(pthread_mutex_init(&fsync_glock_mutex, NULL) == 0); +#endif + #if !defined(AFS_DEMAND_ATTACH_FS) /* * For DAFS, we do not start the Rx server threads until after