From d273a9d82d9490778beb8a9ca1d7f1519294e260 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 22 Jun 2020 10:24:14 +0100 Subject: [PATCH] vfs: remove items from writeback when dirty, don't just cancel the upload This stops open items continually trying to be uploaded --- vfs/vfscache/item.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vfs/vfscache/item.go b/vfs/vfscache/item.go index 14409ffa3..559e11623 100644 --- a/vfs/vfscache/item.go +++ b/vfs/vfscache/item.go @@ -369,7 +369,9 @@ func (item *Item) _dirty() { item.metaDirty = true if !item.modified { item.modified = true - go item.c.writeback.cancelUpload(item) + item.mu.Unlock() + item.c.writeback.remove(item) + item.mu.Lock() } if !item.info.Dirty { item.info.Dirty = true