294ea814bf
This commit prefers the use of 'defer' for fs.Unlock (and fs.RUnlock) because it is more idiomatic Go and reduces repetition in the code, lending to a cleaner code base. It also switches a few uses of the lock to read-only locks, which should improve performance of those functions dramatically in certain contexts.