added flush() call
diff --git a/lib/fuse.c b/lib/fuse.c
index fddcc33..9f5e8a9 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -829,6 +829,22 @@
     }
 }
 
+static void do_flush(struct fuse *f, struct fuse_in_header *in)
+{
+    char *path;
+    int res;
+
+    res = -ENOENT;
+    path = get_path(f, in->ino);
+    if(path != NULL) {
+        res = -ENOSYS;
+        if(f->op.flush)
+            res = f->op.flush(path);
+        free(path);
+    }
+    send_reply(f, in, res, NULL, 0);
+}
+
 static void do_release(struct fuse *f, struct fuse_in_header *in,
                        struct fuse_open_in *arg)
 {
@@ -1215,6 +1231,10 @@
         do_open(f, in, (struct fuse_open_in *) inarg);
         break;
 
+    case FUSE_FLUSH:
+        do_flush(f, in);
+        break;
+
     case FUSE_RELEASE:
         do_release(f, in, (struct fuse_open_in *) inarg);
         break;