aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file2_allocate_truncate.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-07-05 20:05:07 +0200
committerJakob Unterwurzacher2020-07-05 20:10:53 +0200
commit63f68a0fcd514b7cf96a485016c2db23c60c3405 (patch)
treeb3c7cdb39fcec34250036a1d5cdef8321c79fe6e /internal/fusefrontend/file2_allocate_truncate.go
parentc22e78ee41f4c5a91429bb83c6be3e60b4c2a20f (diff)
v2api: implement Setattr
Diffstat (limited to 'internal/fusefrontend/file2_allocate_truncate.go')
-rw-r--r--internal/fusefrontend/file2_allocate_truncate.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fusefrontend/file2_allocate_truncate.go b/internal/fusefrontend/file2_allocate_truncate.go
index f799a3e..9a3d7d1 100644
--- a/internal/fusefrontend/file2_allocate_truncate.go
+++ b/internal/fusefrontend/file2_allocate_truncate.go
@@ -81,8 +81,8 @@ func (f *File2) Allocate(off uint64, sz uint64, mode uint32) fuse.Status {
return f.truncateGrowFile(oldPlainSz, newPlainSz)
}
-// Truncate - FUSE call
-func (f *File2) Truncate(newSize uint64) fuse.Status {
+// truncate - called from Setattr.
+func (f *File2) truncate(newSize uint64) fuse.Status {
f.fdLock.RLock()
defer f.fdLock.RUnlock()
if f.released {