From 87e748f20df109be127827f7f45c1ce549e217f4 Mon Sep 17 00:00:00 2001 From: Tom Keiser Date: Mon, 11 Apr 2005 19:10:58 +0000 Subject: [PATCH] cblater-hold-lock-on-broadcast-20050411 avoid race from not holding lock around fsync_cond broadcast --- src/viced/callback.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/viced/callback.c b/src/viced/callback.c index f5d2b912c6..c8344cb719 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -1408,7 +1408,9 @@ BreakVolumeCallBacksLater(afs_uint32 volume) ViceLog(25, ("Fsync thread wakeup\n")); #ifdef AFS_PTHREAD_ENV + FSYNC_LOCK; assert(pthread_cond_broadcast(&fsync_cond) == 0); + FSYNC_UNLOCK; #else LWP_NoYieldSignal(fsync_wait); #endif