diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go index a14c59c55..64f160953 100644 --- a/fs/accounting/stats.go +++ b/fs/accounting/stats.go @@ -368,7 +368,7 @@ func (s *StatsInfo) averageLoop(ctx context.Context) { // Call with the mutex held func (s *StatsInfo) _startAverageLoop() { if !s.average.started { - ctx, cancel := context.WithCancel(s.ctx) + ctx, cancel := context.WithCancel(context.Background()) s.average.cancel = cancel s.average.started = true s.average.stopped.Add(1)