From b56610798e6b5a321242d394a90c78aff18e237f Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Mon, 15 May 2023 10:24:32 -0400 Subject: [PATCH] cgofuse/lock: lint - struct alignment This shouldn't change the size of the struct, but it does reduce the pointer bytes inspected by the garbage collector by half*. *at least on amd64 when using `gc` --- internal/filesystem/cgofuse/lock/lock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/filesystem/cgofuse/lock/lock.go b/internal/filesystem/cgofuse/lock/lock.go index 0167234e..d67d4623 100644 --- a/internal/filesystem/cgofuse/lock/lock.go +++ b/internal/filesystem/cgofuse/lock/lock.go @@ -21,8 +21,8 @@ type ( // PathLocker is a hierarchical path locker, // inspired by Ritik Malhotra's paper on path-based locks. PathLocker struct { - lockTableMu sync.Mutex lockTable pathLockerMap + lockTableMu sync.Mutex } // UnlockFunc must be called after an operation completes. // Typically a single defer statement is used