diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-02-20 06:06:19 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-02-20 04:04:44 -0800 |
commit | f9269f4776141ae78fb10d1bf5ae63da7595a369 (patch) | |
tree | 5e4c4ba1cef372ede121cc6ebb4c556a7df43e2f /xlators | |
parent | 2cf958fd48129f682c19645ef007f9b1fe9fcd82 (diff) |
fuse: check the return value of pthread_cond_timedwait before logging in fuse_thread_proc
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 650 (log message says "pthread_cond_timedout returned nonzero value" even when the return value is zero)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=650
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index a51cf6eed98..2b93cfb9886 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3080,17 +3080,16 @@ fuse_thread_proc (void *data) ret = pthread_cond_timedwait (&priv->child_up_cond, &priv->child_up_mutex, &timeout); - if (ret != 0) - break; - + if (ret != 0) { + gf_log (this->name, GF_LOG_DEBUG, + " pthread_cond_timedout returned non zero value" + " ret: %d errno: %d", ret, errno); + break; + } } } pthread_mutex_unlock (&priv->child_up_mutex); - gf_log (this->name, GF_LOG_DEBUG, - " pthread_cond_timedout returned non zero value" - " ret: %d errno: %d", ret, errno); - for (;;) { iobuf = iobuf_get (this->ctx->iobuf_pool); /* Add extra 128 byte to the first iov so that it can |