From 63f68a0fcd514b7cf96a485016c2db23c60c3405 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 5 Jul 2020 20:05:07 +0200 Subject: v2api: implement Setattr --- internal/fusefrontend/file2_allocate_truncate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/fusefrontend/file2_allocate_truncate.go') 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 { -- cgit v1.2.3