From f9269f4776141ae78fb10d1bf5ae63da7595a369 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Sat, 20 Feb 2010 06:06:19 +0000 Subject: fuse: check the return value of pthread_cond_timedwait before logging in fuse_thread_proc Signed-off-by: Raghavendra Bhat Signed-off-by: Anand V. Avati 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 --- xlators/mount/fuse/src/fuse-bridge.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'xlators/mount') 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 -- cgit