]> err.no Git - linux-2.6/blobdiff - fs/hostfs/hostfs_user.c
[PATCH] fuse: move INIT handling to inode.c
[linux-2.6] / fs / hostfs / hostfs_user.c
index 4796e8490f7d47705e1a1401ba2e4f77f2e38fb7..b97809deba66ce63e2644bf698fdc0ac851fe1bf 100644 (file)
@@ -153,10 +153,24 @@ int lseek_file(int fd, long long offset, int whence)
        int ret;
 
        ret = lseek64(fd, offset, whence);
-       if(ret < 0) return(-errno);
+       if(ret < 0)
+               return(-errno);
        return(0);
 }
 
+int fsync_file(int fd, int datasync)
+{
+       int ret;
+       if (datasync)
+               ret = fdatasync(fd);
+       else
+               ret = fsync(fd);
+
+       if (ret < 0)
+               return -errno;
+       return 0;
+}
+
 void close_file(void *stream)
 {
        close(*((int *) stream));