소스 검색

Merge pull request #12988 from Mashimiao/remove-unused-container-functions

cleanup: remove unneeded locks
Alexander Morozov 10 년 전
부모
커밋
340fd140e6
1개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 6
      daemon/container.go

+ 1 - 6
daemon/container.go

@@ -1053,16 +1053,11 @@ func (container *Container) Exposes(p nat.Port) bool {
 }
 
 func (container *Container) HostConfig() *runconfig.HostConfig {
-	container.Lock()
-	res := container.hostConfig
-	container.Unlock()
-	return res
+	return container.hostConfig
 }
 
 func (container *Container) SetHostConfig(hostConfig *runconfig.HostConfig) {
-	container.Lock()
 	container.hostConfig = hostConfig
-	container.Unlock()
 }
 
 func (container *Container) DisableLink(name string) {