mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
cblater-hold-lock-on-broadcast-20050411
avoid race from not holding lock around fsync_cond broadcast
This commit is contained in:
parent
a054c41917
commit
87e748f20d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user