summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/syncop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 93f6053558..021834ed42 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -660,8 +660,8 @@ synctask_switchto (struct synctask *task)
#endif
if (swapcontext (&task->proc->sched, &task->ctx) < 0) {
- gf_msg ("syncop", GF_LOG_ERROR, errno, LG_MSG_SWAPCONTEXT_FAILED,
- "swapcontext failed");
+ gf_msg ("syncop", GF_LOG_ERROR, errno,
+ LG_MSG_SWAPCONTEXT_FAILED, "swapcontext failed");
}
if (task->state == SYNCTASK_DONE) {
@@ -915,6 +915,7 @@ __synclock_lock (struct synclock *lock)
while (lock->lock) {
if (task) {
/* called within a synctask */
+ task->woken = 0;
list_add_tail (&task->waitq, &lock->waitq);
pthread_mutex_unlock (&lock->guard);
synctask_yield (task);