more reverting
diff --git a/lib/fuse.c b/lib/fuse.c
index 2209212..b52febb 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -664,15 +664,12 @@
return err;
}
-static int do_truncate(struct fuse *f, const char *path, struct stat *attr,
- struct fuse_file_info *fi)
+static int do_truncate(struct fuse *f, const char *path, struct stat *attr)
{
int err;
err = -ENOSYS;
- if (fi && f->op.ftruncate)
- err = f->op.ftruncate(path, attr->st_size, fi);
- else if (f->op.truncate)
+ if (f->op.truncate)
err = f->op.truncate(path, attr->st_size);
return err;
@@ -699,6 +696,8 @@
char *path;
int err;
+ (void) fi;
+
err = -ENOENT;
pthread_rwlock_rdlock(&f->tree_lock);
path = get_path(f, ino);
@@ -711,7 +710,7 @@
if (!err && (valid & (FUSE_SET_ATTR_UID | FUSE_SET_ATTR_GID)))
err = do_chown(f, path, attr, valid);
if (!err && (valid & FUSE_SET_ATTR_SIZE))
- err = do_truncate(f, path, attr, fi);
+ err = do_truncate(f, path, attr);
if (!err && (valid & (FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME)) == (FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME))
err = do_utime(f, path, attr);
if (!err)