From: Derrick Brashear Date: Wed, 23 Jan 2008 03:20:13 +0000 (+0000) Subject: viced-fsync-glock-creation-20080122 X-Git-Tag: BP-openafs-windows-kdfs-ifs~189 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0e8adf69538638b8caa56d9b1fa72beba74734bd;p=packages%2Fo%2Fopenafs.git viced-fsync-glock-creation-20080122 LICENSE IPL10 create fsync glock and cond before we initialize volume package. oops? --- diff --git a/src/viced/viced.c b/src/viced/viced.c index 2afb6aedd..9888d351b 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -578,11 +578,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) { @@ -2141,6 +2136,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