git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
a054c41
)
cblater-hold-lock-on-broadcast-20050411
author
Tom Keiser
<tkeiser@gmail.com>
Mon, 11 Apr 2005 19:10:58 +0000 (19:10 +0000)
committer
Derrick Brashear
<shadow@dementia.org>
Mon, 11 Apr 2005 19:10:58 +0000 (19:10 +0000)
avoid race from not holding lock around fsync_cond broadcast
src/viced/callback.c
patch
|
blob
|
history
diff --git
a/src/viced/callback.c
b/src/viced/callback.c
index
f5d2b91
..
c8344cb
100644
(file)
--- 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