aboutsummaryrefslogtreecommitdiff
path: root/cache.c
diff options
context:
space:
mode:
authorJulio Merino <jmmv@google.com>2016-02-08 11:43:01 -0500
committerJulio Merino <jmmv@meroh.net>2016-02-08 20:50:22 -0500
commitd8230e72ca01fd27509ef7134f0957c73f164ae3 (patch)
tree2dac21fc3dc0ab2dd2103350d08e560177c634a5 /cache.c
parente0025219b33de3cbf3152884b48412feb461c894 (diff)
downloadsshfs-d8230e72ca01fd27509ef7134f0957c73f164ae3.tar
sshfs-d8230e72ca01fd27509ef7134f0957c73f164ae3.tar.gz
sshfs-d8230e72ca01fd27509ef7134f0957c73f164ae3.tar.bz2
sshfs-d8230e72ca01fd27509ef7134f0957c73f164ae3.zip
Drop the cache_enabled hack
cache_enabled leaked the cache.on setting from the cache module abstraction back into sshfs, and it only did so for the Darwin case. This hack was being used to avoid calling cache_add_attr and cache_invalidate when the cache was disabled... but these two functions already do nothing when in that case: there is no need to do a second check in the caller.
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/cache.c b/cache.c
index ffdf71d..6e93157 100644
--- a/cache.c
+++ b/cache.c
@@ -554,9 +554,6 @@ struct fuse_operations *cache_init(struct fuse_cache_operations *oper)
cache.next_oper = oper;
cache_unity_fill(oper, &cache_oper);
-#if __APPLE__
- cache_enabled = cache.on;
-#endif
if (cache.on) {
cache_fill(oper, &cache_oper);
pthread_mutex_init(&cache.lock, NULL);
@@ -591,7 +588,3 @@ int cache_parse_options(struct fuse_args *args)
return fuse_opt_parse(args, &cache, cache_opts, NULL);
}
-
-#if __APPLE__
-int cache_enabled;
-#endif