aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorRian Hunter <rian@alum.mit.edu>2016-06-01 23:21:46 -0700
committerRian Hunter <rian@alum.mit.edu>2016-06-01 23:27:01 -0700
commit74bfa3850a2568f96dd1d090a9386534c9bb4629 (patch)
treea550c8181a064a1d8c313ef89c4d55eb42c53e0f /sshfs.c
parent0f6f33b1b4084426a78035788e5e8502a3dc5af0 (diff)
downloadsshfs-74bfa3850a2568f96dd1d090a9386534c9bb4629.tar
sshfs-74bfa3850a2568f96dd1d090a9386534c9bb4629.tar.gz
sshfs-74bfa3850a2568f96dd1d090a9386534c9bb4629.tar.bz2
sshfs-74bfa3850a2568f96dd1d090a9386534c9bb4629.zip
Support the lack of paths when cache is off
Before FUSE 2.9, FUSE had to emulate unlink() if a file was still open via renaming to a hidden file. This was due to the requirement that a valid "path" argument must be submitted for many FUSE operations. FUSE 2.9 introduced the flag_nullpath_ok and flag_nopath flags that allow a FUSE file system to signal to FUSE that the "path" argument may be NULL in certain operations. sshfs doesn't require paths if the cache isn't used so communicate that information to the FUSE layer.
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshfs.c b/sshfs.c
index 9fb68af..f41d987 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -3373,6 +3373,10 @@ static struct fuse_cache_operations sshfs_oper = {
.ftruncate = sshfs_ftruncate,
.fgetattr = sshfs_fgetattr,
#endif
+#if FUSE_VERSION >= 29
+ .flag_nullpath_ok = 1,
+ .flag_nopath = 1,
+#endif
},
.cache_getdir = sshfs_getdir,
};