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

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

(cherry picked from commit 0e8adf69538638b8caa56d9b1fa72beba74734bd)

src/viced/viced.c

index 7b837cf81b5087d1915f2511bfeb3855b904305a..322fffccabf10ca1f5eb971587e4dda6fdc7b8bc 100644 (file)
@@ -482,11 +482,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
-
     while (1) {
        FSYNC_LOCK;
 #ifdef AFS_PTHREAD_ENV
@@ -1913,6 +1908,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
+
     rx_StartServer(0);         /* now start handling requests */
 
     /* we ensure that there is enough space in the vnode buffer to satisfy