summaryrefslogtreecommitdiff
path: root/client/gvfsfusedaemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/gvfsfusedaemon.c')
-rw-r--r--client/gvfsfusedaemon.c48
1 files changed, 4 insertions, 44 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 92ddf0fb..de37c3b2 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -1238,6 +1238,10 @@ vfs_release (const gchar *path, struct fuse_file_info *fi)
if (fh)
{
+ g_mutex_lock (&fh->mutex);
+ file_handle_close_stream (fh);
+ g_mutex_unlock (&fh->mutex);
+
/* get_file_handle_from_info () adds a "working ref", so unref twice. */
file_handle_unref (fh);
file_handle_unref (fh);
@@ -1530,48 +1534,6 @@ vfs_write (const gchar *path, const gchar *buf, size_t len, off_t offset,
}
static gint
-vfs_flush (const gchar *path, struct fuse_file_info *fi)
-{
- FileHandle *fh = get_file_handle_from_info (fi);
-
- debug_print ("vfs_flush: %s\n", path);
-
- if (fh)
- {
- g_mutex_lock (&fh->mutex);
- file_handle_close_stream (fh);
- g_mutex_unlock (&fh->mutex);
-
- /* get_file_handle_from_info () adds a "working ref", so release that. */
- file_handle_unref (fh);
- }
-
- /* TODO: Error handling. */
- return 0;
-}
-
-static gint
-vfs_fsync (const gchar *path, gint sync_data_only, struct fuse_file_info *fi)
-{
- FileHandle *fh = get_file_handle_from_info (fi);
-
- debug_print ("vfs_flush: %s\n", path);
-
- if (fh)
- {
- g_mutex_lock (&fh->mutex);
- file_handle_close_stream (fh);
- g_mutex_unlock (&fh->mutex);
-
- /* get_file_handle_from_info () adds a "working ref", so release that. */
- file_handle_unref (fh);
- }
-
- /* TODO: Error handling. */
- return 0;
-}
-
-static gint
vfs_opendir (const gchar *path, struct fuse_file_info *fi)
{
GFile *file;
@@ -2538,8 +2500,6 @@ static struct fuse_operations vfs_oper =
.open = vfs_open,
.create = vfs_create,
.release = vfs_release,
- .flush = vfs_flush,
- .fsync = vfs_fsync,
.read = vfs_read,
.write = vfs_write,