No need for container.Lock if rename same name
No need for container.Lock if rename same name

During the renaming of a container, no need to call `container.Lock()`
if `oldName == newName`.

This is a follow-up from #23360 (commit 88d1ee6c112d980a63c625389524047fea32e6d9)

Signed-off-by: Vincent Demeester <87e1f221a672a14a323e57bb65eaea19d3ed3804@sbr.pm>

sdurrheimer/docker,vdemeester/docker,raja-sami-10p/moby,Ramzec/docker,tianon/docker,djs55/docker,ajaymdesai/docker,gschaetz/moby,icaoweiwei/docker,nalind/docker,ajaymdesai/docker,dccurtis/docker,yosifkit/docker,tklauser/docker,trebonian/docker,dsheets/moby,moby/moby,yosifkit/docker,alfred-landrum/docker,abhinavdahiya/docker,dperny/docker,dsheets/moby,tianon/docker,tklauser/docker,rhatdan/storage,moul/docker,mtrmac/docker,projectatomic/docker,tonistiigi/docker,darrenstahlmsft/moby,sarnautov/moby,erikstmartin/docker,djs55/docker,mikebrow/docker,Mokolea/docker,ffoysal/docker,kencochrane/docker,mahak/docker,jimjag/docker,portworx/docker,moby/moby,jameszhan/docker,erikh/docker,endophage/docker,noironetworks/docker,yongtang/docker,abhinavdahiya/docker,Syntaxide/docker,13W/docker,afein/docker,nawawi/docker,bearstech/moby,hypriot/docker,coreos/docker,containers/storage,bluebreezecf/docker,konstruktoid/docker-upstream,13W/docker,pramodhkp/moby,paralin/docker,q384566678/docker,asbjornenge/docker,rhatdan/storage,jvanz/docker,bluebreezecf/docker,dsau/docker,ndeloof/docker,zhuguihua/docker,danyalKhaliq10p/moby,YuPengZTE/docker,shishir-a412ed/docker,mtanlee/docker,konstruktoid/docker-1,tkopczynski/docker,Ramzec/docker,tonistiigi/docker,laijs/moby,mtesselH/docker,kencochrane/docker,Morsicus/docker,tkopczynski/docker,xuxinkun/docker,portworx/docker,lixiaobing10051267/docker,13W/docker,wenchma/docker,justyntemme/docker,ColinHebert/docker,HuKeping/docker,konstruktoid/docker-upstream,coolljt0725/docker,flavio/docker,Syntaxide/docker,abhinavdahiya/docker,noxiouz/docker,rhatdan/docker,jlhawn/docker,containers/storage,mstanleyjones/docker,erikh/docker,nawawi/docker,tophj-ibm/docker,tagomoris/docker,amatsus/docker,xiekeyang/docker,danyalKhaliq10p/moby,AkihiroSuda/docker,jlhawn/docker,mtanlee/docker,laijs/docker,shhsu/docker,dgageot/docker,kencochrane/docker,SvenDowideit/docker,yosifkit/docker,twaugh/docker,laijs/docker,ibuildthecloud/docker,konstruktoid/docker-upstream,lixiaobing1/docker,mikedougherty/docker,michael-holzheu/docker,jhorwit2/docker,mahak/docker,cloudflare/docker,thaJeztah/docker,13W/docker,docker/docker,harche/docker,konstruktoid/docker-upstream,paralin/docker,JMesser81/docker,stevvooe/docker,Ramzec/docker,estesp/docker,mtanlee/docker,kunalkushwaha/docker,AkihiroSuda/docker,ibuildthecloud/docker,qudongfang/docker,cloudflare/docker,wenchma/docker,dperny/docker,Morsicus/docker,justincormack/docker,mikebrow/docker,rhatdan/storage,dccurtis/docker,xuxinkun/docker,bearstech/moby,nawawi/docker,msabansal/docker,thtanaka/docker,PatrickLang/moby,brahmaroutu/docker,prertik/docker,tagomoris/docker,hqhq/moby,KarthikNayak/docker,lixiaobing10051267/docker,coolljt0725/docker,gnailuy/docker,whuwxl/docker,pradipd/moby,duglin/docker,harche/docker,darrenstahlmsft/moby,Mokolea/docker,dperny/docker,amatsus/docker,unclejack/docker,mkumatag/docker,yummypeng/docker,vdemeester/docker,hypriot/docker,pramodhkp/moby,docker/docker,moul/docker,pradipd/moby,eskaaren/docker,sterchelen/docker,catinthesky/docker,lixiaobing1/docker,sarnautov/moby,diogomonica/docker,dongjoon-hyun/docker,trebonian/docker,miminar/docker,tophj-ibm/docker,noironetworks/docker,jlhawn/docker,prertik/docker,catinthesky/docker,cpuguy83/docker,amatsus/docker,maxamillion/docker,gjaskiewicz/moby,stevvooe/docker,HideoYamauchi/docker,kolyshkin/docker,mohmost12/docker,jwhonce/docker,ibuildthecloud/docker,gschaetz/moby,haveatry/docker,ffoysal/docker,YuPengZTE/docker,crosbymichael/docker,bearstech/moby,naveed-jamil-tenpearls/moby,jameszhan/docker,mike1729/docker,imkin/moby,justincormack/docker,jlebon/docker,mstanleyjones/docker,miminar/docker,ibuildthecloud/docker,cpuguy83/docker,mixja/docker,brahmaroutu/docker,madhanrm/docker,johnstep/moby-moby,sfsmithcha/docker,mahak/docker,imkin/moby,dims/docker,diogomonica/docker,cpuguy83/docker,JMesser81/docker,twaugh/docker,dmcgowan/docker,twaugh/docker,scotttlin/docker,13W/docker,splunk/docker,bonczj/moby-json-file-logger,Mokolea/docker,kunalkushwaha/docker,flavio/docker,jhorwit2/docker,ripcurld0/moby,hqhq/moby,YuPengZTE/docker,dmcgowan/docker,shhsu/docker,liaoqingwei/docker,dims/docker,yp-engineering/docker,moul/docker,madhanrm/docker,hqhq/moby,yongtang/docker,dsheets/moby,xuxinkun/docker,tmp6154/docker,SvenDowideit/docker,sterchelen/docker,miminar/docker,crosbymichael/docker,duglin/docker,HideoYamauchi/docker,KingEmet/docker,dsau/docker,hypriot/docker,kolyshkin/moby,HideoYamauchi/docker,yasiramin10p/moby,wenchma/docker,liaoqingwei/docker,fcrisciani/docker,yp-engineering/docker,allencloud/docker,thtanaka/docker,raja-sami-10p/moby,mohmost12/docker,jimjag/docker,rhatdan/docker,POLJM242/docker,kojiromike/docker,jthelin/docker,PatrickLang/moby,darrenstahlmsft/docker,mtrmac/docker,sfsmithcha/docker,vdemeester/docker,moypray/docker,haveatry/docker,thtanaka/docker,estesp/docker,cyphar/docker,q384566678/docker,mikedougherty/docker,lixiaobing1/docker,madhanrm/docker,thaJeztah/docker,michael-holzheu/docker,estesp/docker,Syntaxide/docker,containers/storage,msabansal/docker,tagomoris/docker,pramodhkp/moby,rancher/docker,jimjag/docker,Morsicus/docker,prertik/docker,kunalkushwaha/docker,resin-io/docker,jlebon/docker,darrenstahlmsft/docker,ajaymdesai/docker,trebonian/docker,mixja/docker,yummypeng/docker,jwhonce/docker,mkumatag/docker,kojiromike/docker,michael-holzheu/docker,dgageot/docker,mohmost12/docker,ColinHebert/docker,zhuguihua/docker,xiaods/docker,HuKeping/docker,tophj-ibm/moby,unclejack/docker,dongjoon-hyun/docker,erikstmartin/docker,kolyshkin/moby,thaJeztah/docker,x1022as/docker,dnephin/docker,jlebon/docker,jvanz/docker,sfsmithcha/docker,cyphar/docker,tophj-ibm/docker,alfred-landrum/docker,dongjoon-hyun/docker,djs55/docker,yongtang/docker,imkin/moby,xiekeyang/docker,noxiouz/docker,cloudflare/docker,paralin/docker,nalind/docker,haveatry/docker,laijs/moby,erikstmartin/docker,shishir-a412ed/docker,endophage/docker,Ramzec/docker,yasiramin10p/moby,msabansal/docker,bonczj/moby-json-file-logger,fcrisciani/docker,AkihiroSuda/docker,eskaaren/docker,allencloud/docker,qudongfang/docker,gschaetz/moby,diogomonica/docker,stevvooe/docker,x1022as/docker,cpuguy83/docker,gnailuy/docker,paralin/docker,dmcgowan/docker,mixja/docker,dsau/docker,charleszheng44/moby,KingEmet/docker,gnailuy/docker,mike1729/docker,ColinHebert/docker,moby/moby,scotttlin/docker,yp-engineering/docker,darrenstahlmsft/moby,q384566678/docker,mahak/docker,icaoweiwei/docker,ibuildthecloud/docker,whuwxl/docker,zhuguihua/docker,mikedougherty/docker,tmp6154/docker,allencloud/docker,catinthesky/docker,mtesselH/docker,rremer/moby,asbjornenge/docker,mstanleyjones/docker,naveed-jamil-tenpearls/moby,danyalKhaliq10p/moby,tklauser/docker,qudongfang/docker,fcrisciani/docker,bonczj/moby-json-file-logger,darrenstahlmsft/docker,docker/docker,mikebrow/docker,splunk/docker,flavio/docker,ndeloof/docker,endophage/docker,charleszheng44/moby,SvenDowideit/docker,maxamillion/docker,akira-baruah/docker,srust/docker,duglin/docker,raja-sami-10p/moby,trebonian/docker,x1022as/docker,rhatdan/docker,dgageot/docker,srust/docker,xiaods/docker,jameszhan/docker,xiaods/docker,jvanz/docker,srust/docker,coolljt0725/docker,xiekeyang/docker,splunk/docker,thaJeztah/docker,sdurrheimer/docker,mike1729/docker,maxamillion/docker,mkumatag/docker,KarthikNayak/docker,asbjornenge/docker,KingEmet/docker,yummypeng/docker,kolyshkin/moby,JMesser81/docker,konstruktoid/docker-1,kolyshkin/docker,sterchelen/docker,harche/docker,PatrickLang/moby,dccurtis/docker,crosbymichael/docker,johnstep/moby-moby,sdurrheimer/docker,jthelin/docker,afein/docker,coreos/docker,rremer/moby,gjaskiewicz/moby,jwhonce/docker,brahmaroutu/docker,tmp6154/docker,dims/docker,justyntemme/docker,dnephin/docker,nalind/docker,whuwxl/docker,tophj-ibm/moby,pradipd/moby,eskaaren/docker,michelvocks/docker,bearstech/moby,ndeloof/docker,laijs/docker,michelvocks/docker,unclejack/docker,laijs/moby,Mokolea/docker,projectatomic/docker,cyphar/docker,johnstep/moby-moby,moul/docker,akira-baruah/docker,HuKeping/docker,AkihiroSuda/docker,yasiramin10p/moby,coreos/docker,resin-io/docker,moypray/docker,mtesselH/docker,dnephin/docker,liaoqingwei/docker,ripcurld0/moby,bluebreezecf/docker,konstruktoid/docker-1,justincormack/docker,rremer/moby,charleszheng44/moby,flavio/docker,naveed-jamil-tenpearls/moby,tophj-ibm/moby,tonistiigi/docker,ripcurld0/moby,jhorwit2/docker,noxiouz/docker,noironetworks/docker,michelvocks/docker,sarnautov/moby,gjaskiewicz/moby,shishir-a412ed/docker,erikh/docker,shhsu/docker,justyntemme/docker,nalind/docker,kojiromike/docker,yosifkit/docker,afein/docker,scotttlin/docker,mtrmac/docker,jimjag/docker,icaoweiwei/docker,ffoysal/docker,rancher/docker,tkopczynski/docker,KarthikNayak/docker,portworx/docker,POLJM242/docker,moypray/docker,lixiaobing10051267/docker,rancher/docker,nawawi/docker,alfred-landrum/docker,resin-io/docker,projectatomic/docker,moby/moby,gnailuy/docker