diff options
author | Jakob Unterwurzacher | 2016-05-05 13:38:39 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-05-05 13:38:39 +0200 |
commit | 730291feabdcdbd6345aa12ddba87a3ffea4ecb1 (patch) | |
tree | 1634fb25289f661c36d519e5a0690edfaa0c5d4d | |
parent | e97962bd3f9ef8cb9fbd57bd2a2424b1cc28ec75 (diff) |
fusefrontend: fix wlock memory leak
The write lock was not freed on release, causing a slow memory leak.
This was noticed by running extractloop.bash for 10 hours.
-rw-r--r-- | internal/fusefrontend/file.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 0d26329..d9588e9 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -302,9 +302,10 @@ func (f *file) Write(data []byte, off int64) (uint32, fuse.Status) { // Release - FUSE call, close file func (f *file) Release() { f.fdLock.Lock() - defer f.fdLock.Unlock() - f.fd.Close() + f.fdLock.Unlock() + + wlock.unregister(f.ino) f.forgotten = true } |