aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-06-29 22:05:23 +0200
committerJakob Unterwurzacher2017-06-29 23:44:32 +0200
commit80676c685fe2b52ce0c48a7d9d922895d0c583b8 (patch)
treebb88c7335bf96ba8e61a42f136241bfc687053cd /internal/fusefrontend/file.go
parent3d32bcd37b751a1ed089bbe07c1341ab8d7b9773 (diff)
contentenc: add safer "bPool" pool variant; add pBlockPool
bPool verifies the lengths of slices going in and out. Also, add a plaintext block pool - pBlockPool - and use it for decryption.
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index f70c9a5..277a71e 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -311,8 +311,8 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) {
}
// Write
_, err = f.fd.WriteAt(ciphertext, cOff)
- // Return memory to cWritePool
- f.fs.contentEnc.CWritePut(ciphertext)
+ // Return memory to CReqPool
+ f.fs.contentEnc.CReqPool.Put(ciphertext)
if err != nil {
tlog.Warn.Printf("doWrite: Write failed: %s", err.Error())
return 0, fuse.ToStatus(err)