From b8474295af45e3ceabdb4cd52557cfec3c007d3e Mon Sep 17 00:00:00 2001 From: drivebyer Date: Thu, 1 Jun 2023 00:40:23 +0800 Subject: [PATCH] fix: time() returned function not being called as expected in globalSync() (#17319) --- cmd/os_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/os_unix.go b/cmd/os_unix.go index 79f98479f..fa04c79a5 100644 --- a/cmd/os_unix.go +++ b/cmd/os_unix.go @@ -340,6 +340,6 @@ func readDirWithOpts(dirPath string, opts readDirOpts) (entries []string, err er } func globalSync() { - defer globalOSMetrics.time(osMetricSync) + defer globalOSMetrics.time(osMetricSync)() syscall.Sync() }