s3: let g_lock_unlock() return more specific status codes on failure