diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2008-10-08 18:23:33 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-10-08 18:23:33 +0000 |
commit | c7dbdc1f77949506ddce5448bf844e6bf4c948fc (patch) | |
tree | 9434659d14d7a8a3eee241bee0ec520a3cc7491d | |
parent | 8a4015a3b6bba62e320994f7c1bf23e4014683a4 (diff) | |
download | sshfs-c7dbdc1f77949506ddce5448bf844e6bf4c948fc.tar sshfs-c7dbdc1f77949506ddce5448bf844e6bf4c948fc.tar.gz sshfs-c7dbdc1f77949506ddce5448bf844e6bf4c948fc.tar.bz2 sshfs-c7dbdc1f77949506ddce5448bf844e6bf4c948fc.zip |
Fix harmless glib assertations with "cache=no"
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | cache.c | 6 |
2 files changed, 8 insertions, 0 deletions
@@ -6,6 +6,8 @@ * Fix error if username contains a comma character. Reported by Yang Zhang + * Fix harmless glib assertations with "cache=no" + 2008-07-11 Miklos Szeredi <miklos@szeredi.hu> * Released 2.1 @@ -105,6 +105,9 @@ static void cache_purge_parent(const char *path) void cache_invalidate(const char *path) { + if (!cache.on) + return; + pthread_mutex_lock(&cache.lock); cache_purge(path); pthread_mutex_unlock(&cache.lock); @@ -163,6 +166,9 @@ void cache_add_attr(const char *path, const struct stat *stbuf, uint64_t wrctr) struct node *node; time_t now; + if (!cache.on) + return; + pthread_mutex_lock(&cache.lock); if (wrctr == cache.write_ctr) { node = cache_get(path); |