summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file_allocate_truncate.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-06-30 23:11:38 +0200
committerJakob Unterwurzacher2017-06-30 23:11:38 +0200
commit06398e82d91c81c618bfa6a481c0e9070847c909 (patch)
tree7179445982d09f79843f035557e8cd8eb8d84c2c /internal/fusefrontend/file_allocate_truncate.go
parent2932a285aa2e8f6ef7cdd8b3c0387438dcb96015 (diff)
fusefrontend: Read: use provided buffer
This will allow us to return internal buffers to a pool.
Diffstat (limited to 'internal/fusefrontend/file_allocate_truncate.go')
-rw-r--r--internal/fusefrontend/file_allocate_truncate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go
index 85ed11c..86aee8e 100644
--- a/internal/fusefrontend/file_allocate_truncate.go
+++ b/internal/fusefrontend/file_allocate_truncate.go
@@ -144,7 +144,7 @@ func (f *file) Truncate(newSize uint64) fuse.Status {
var data []byte
if lastBlockLen > 0 {
var status fuse.Status
- data, status = f.doRead(plainOff, lastBlockLen)
+ data, status = f.doRead(nil, plainOff, lastBlockLen)
if status != fuse.OK {
tlog.Warn.Printf("Truncate: shrink doRead returned error: %v", err)
return status