git » libjio » commit d568f22

autosync: Fix autosync_check() when not using autosync.

author Alberto Bertogli
2009-04-15 15:37:41 UTC
committer Alberto Bertogli
2009-04-15 15:52:45 UTC
parent 7982cbf8c2cbd5c10cc4b680153684cf3fbd463f

autosync: Fix autosync_check() when not using autosync.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libjio/autosync.c +3 -0

diff --git a/libjio/autosync.c b/libjio/autosync.c
index 2ba0fe3..750bec8 100644
--- a/libjio/autosync.c
+++ b/libjio/autosync.c
@@ -118,6 +118,9 @@ int jfs_autosync_stop(struct jfs *fs)
  * been exceeded. Must be called with fs' ltlock held. */
 void autosync_check(struct jfs *fs)
 {
+	if (fs->as_cfg == NULL)
+		return;
+
 	if (fs->ltrans_len > fs->as_cfg->max_bytes)
 		pthread_cond_signal(&fs->as_cfg->cond);
 }