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.
This commit is contained in:
Jakob Unterwurzacher 2016-05-05 13:38:39 +02:00
parent e97962bd3f
commit 730291feab

View File

@ -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
}