]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced-fsync-glock-creation-20080122
authorDerrick Brashear <shadow@dementia.org>
Wed, 23 Jan 2008 03:20:13 +0000 (03:20 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 23 Jan 2008 03:20:13 +0000 (03:20 +0000)
LICENSE IPL10

create fsync glock and cond before we initialize volume package. oops?

src/viced/viced.c

index 2afb6aedd1387a0f4cdc3bc70c8efce6298bdeb2..9888d351b93e08d5bbffacd35db88b3433bfeb93 100644 (file)
@@ -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