From: Tom Keiser Date: Mon, 11 Apr 2005 19:12:33 +0000 (+0000) Subject: STABLE14-cblater-hold-lock-on-broadcast-20050411 X-Git-Tag: openafs-devel-1_3_82~74 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d048e6e54e875cc795cd00908c8c105538c0b033;p=packages%2Fo%2Fopenafs.git STABLE14-cblater-hold-lock-on-broadcast-20050411 avoid race from not holding lock around fsync_cond broadcast (cherry picked from commit 87e748f20df109be127827f7f45c1ce549e217f4) --- diff --git a/src/viced/callback.c b/src/viced/callback.c index f5d2b912c..c8344cb71 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