diff --git a/pkg/vfs/writer.go b/pkg/vfs/writer.go index 439ae8ddcec9..4a1cb75aa8dc 100644 --- a/pkg/vfs/writer.go +++ b/pkg/vfs/writer.go @@ -203,7 +203,11 @@ func (c *chunkWriter) commitThread() { f.Lock() if err != 0 { - if err != syscall.ENOENT && err != syscall.ENOSPC && err != syscall.EDQUOT { + if err == syscall.ENOENT { + go func(id uint64, length int) { + _ = f.w.store.Remove(id, length) + }(s.id, int(s.length)) + } else if err != syscall.ENOSPC && err != syscall.EDQUOT { logger.Warnf("write inode:%d error: %s", f.inode, err) err = syscall.EIO }