diff options
-rw-r--r-- | libglusterfs/src/syncop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 07823ccb1..471ae1e05 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -82,6 +82,8 @@ __wait (struct synctask *task) void synctask_yield (struct synctask *task) { + xlator_t *oldTHIS = THIS; + #if defined(__NetBSD__) && defined(_UC_TLSBASE) /* Preserve pthread private pointer through swapcontex() */ task->proc->sched.uc_flags &= ~_UC_TLSBASE; @@ -91,6 +93,8 @@ synctask_yield (struct synctask *task) gf_log ("syncop", GF_LOG_ERROR, "swapcontext failed (%s)", strerror (errno)); } + + THIS = oldTHIS; } |