cblater-hold-lock-on-broadcast-20050411

avoid race from not holding lock around fsync_cond broadcast
This commit is contained in:
Tom Keiser 2005-04-11 19:10:58 +00:00 committed by Derrick Brashear
parent a054c41917
commit 87e748f20d

View File

@ -1408,7 +1408,9 @@ BreakVolumeCallBacksLater(afs_uint32 volume)
ViceLog(25, ("Fsync thread wakeup\n")); ViceLog(25, ("Fsync thread wakeup\n"));
#ifdef AFS_PTHREAD_ENV #ifdef AFS_PTHREAD_ENV
FSYNC_LOCK;
assert(pthread_cond_broadcast(&fsync_cond) == 0); assert(pthread_cond_broadcast(&fsync_cond) == 0);
FSYNC_UNLOCK;
#else #else
LWP_NoYieldSignal(fsync_wait); LWP_NoYieldSignal(fsync_wait);
#endif #endif