Fix a race in maintaining the journald reader list
Fix a race in maintaining the journald reader list

The journald log reader keeps a map of following readers so that it can
close them properly when the journald reader object itself is closed,
but it was possible for its worker goroutine to be scheduled so that the
worker attempted to remove a reader from the map before the reader had
been added to the map.  This patch adds the item to the map before
starting the goroutine which is expected to eventually remove it.

Signed-off-by: Nalin Dahyabhai <f562fcb2a0b898bf0be1afc867ea92325d8f825f@redhat.com> (github: nalind)

hypriot/docker,moypray/docker,portworx/docker,moul/docker,jwhonce/docker,laijs/moby,konstruktoid/docker-1,tianon/docker,gnailuy/docker,bonczj/moby-json-file-logger,gnailuy/docker,noxiouz/docker,rhardih/docker,jlhawn/docker,sean-jc/docker,LuisBosquez/docker.github.io,POLJM242/docker,troy0820/docker.github.io,catinthesky/docker,jlebon/docker,mixja/docker,jvanz/docker,13W/docker,icaoweiwei/docker,gdevillele/docker.github.io,bluebreezecf/docker,estesp/docker,lixiaobing10051267/docker,TrumanLing/docker,projectatomic/docker,jhorwit2/docker,charleszheng44/moby,kojiromike/docker,haveatry/docker,geekylucas/docker,gigidwan/docker,joeuo/docker.github.io,tonistiigi/docker,ailispaw/docker,denverdino/docker.github.io,liaoqingwei/docker,mtesselH/docker,kunalkushwaha/docker,bdwill/docker.github.io,naveed-jamil-tenpearls/moby,joeuo/docker.github.io,londoncalling/docker.github.io,denverdino/docker.github.io,unclejack/docker,jhorwit2/docker,yummypeng/docker,bfirsh/docker,duglin/docker,moxiegirl/docker,johnstep/docker.github.io,miminar/docker,flavio/docker,Tenk42/docker,justyntemme/docker,PatrickLang/moby,erikstmartin/docker,sanscontext/docker.github.io,resin-io/docker,scollier/docker,stainboy/docker,Ramzec/docker,ajaymdesai/docker,ajaymdesai/docker,lixiaobing1/docker,prertik/docker,dmcgowan/docker,stainboy/docker,shubheksha/docker.github.io,joeuo/docker.github.io,rillig/docker.github.io,dsheets/moby,joaofnfernandes/docker.github.io,SvenDowideit/docker,dperny/docker,alfred-landrum/docker,mahak/docker,sfsmithcha/docker,ndeloof/docker,denverdino/docker.github.io,hqhq/moby,erikstmartin/docker,bearstech/moby,shishir-a412ed/docker,TheBigBear/docker,dsheets/moby,duglin/docker,cloudflare/docker,afein/docker,naveed-jamil-tenpearls/moby,vdemeester/docker,anujbahuguna/docker,BenHall/docker,lixiaobing1/docker,phiroict/docker,cloudflare/docker,moby/moby,johnstep/docker.github.io,yummypeng/docker,Tenk42/docker,vdemeester/docker,maxamillion/docker,tmp6154/docker,allencloud/docker,LaynePeng/docker,ivansaracino/docker,ZJU-SEL/docker,afein/docker,noironetworks/docker,phiroict/docker,LaynePeng/docker,DoraALin/docker,Ramzec/docker,JimGalasyn/docker.github.io,portworx/docker,alfred-landrum/docker,darrenstahlmsft/moby,cyli/docker,jimjag/docker,yp-engineering/docker,SvenDowideit/docker,scollier/docker,imkin/moby,umerazad/docker,nguyentm83/docker,danix800/docker.github.io,mikebrow/docker,willmtemple/docker,akira-baruah/docker,gdevillele/docker.github.io,medallia/docker,flavio/docker,yosifkit/docker,umerazad/docker,sanjeo/docker,HuKeping/docker,konstruktoid/docker-upstream,tmp6154/docker,splunk/docker,nghiant2710/docker,cyphar/docker,sarnautov/moby,sean-jc/docker,raja-sami-10p/moby,menglingwei/denverdino.github.io,pradipd/moby,xiaods/docker,sterchelen/docker,tkopczynski/docker,jvanz/docker,shhsu/docker,docker/docker.github.io,runcom/docker,gjaskiewicz/moby,erikstmartin/docker,menglingwei/denverdino.github.io,erikh/docker,xuxinkun/docker,rhatdan/docker,Morsicus/docker,wenchma/docker,tophj-ibm/docker,thaJeztah/docker.github.io,docker-zh/docker.github.io,diogomonica/docker,alexisbellido/docker.github.io,Microsoft/docker,Ramzec/docker,crosbymichael/docker,Shopify/docker,danyalKhaliq10p/moby,asbjornenge/docker,sunyuan3/docker,sheimi/docker,scotttlin/docker,denverdino/docker.github.io,hqhq/moby,konstruktoid/docker-upstream,Altiscale/docker,sarnautov/moby,rillig/docker.github.io,ivansaracino/docker,prertik/docker,ndeloof/docker,shubheksha/docker.github.io,ZJU-SEL/docker,YujiOshima/docker,tagomoris/docker,nawawi/docker,q384566678/docker,laijs/moby,shishir-a412ed/docker,Microsoft/docker,justyntemme/docker,Shopify/docker,sheimi/docker,KarthikNayak/docker,anujbahuguna/docker,danyalKhaliq10p/moby,coreos/docker,Syntaxide/docker,jzwlqx/denverdino.github.io,yasiramin10p/moby,denverdino/denverdino.github.io,shin-/docker.github.io,jongiddy/docker,jlhawn/docker,endophage/docker,mgoelzer/docker,SvenDowideit/docker,eskaaren/docker,jameszhan/docker,ffoysal/docker,dccurtis/docker,rancher/docker,sfsmithcha/docker,paralin/docker,splunk/docker,medallia/docker,laijs/moby,darrenstahlmsft/moby,TrumanLing/docker,mike1729/docker,madhanrm/docker,shubheksha/docker.github.io,anweiss/docker.github.io,darrenstahlmsft/docker,raja-sami-10p/moby,bluebreezecf/docker,nalind/docker,zhuguihua/docker,paralin/docker,zhuguihua/docker,rhatdan/storage,djs55/docker,mgoelzer/docker,docker-zh/docker.github.io,ColinHebert/docker,yasiramin10p/moby,mike1729/docker,msabansal/docker,mstanleyjones/docker,dongjoon-hyun/docker,tkopczynski/docker,inatatsu/docker,portworx/docker,aduermael/docker.github.io,shishir-a412ed/docker,troy0820/docker.github.io,madhanrm/docker,pramodhkp/moby,gjaskiewicz/moby,djs55/docker,cpuguy83/docker,jlebon/docker,erikh/docker,charleswhchan/docker,justincormack/docker,mike1729/docker,HideoYamauchi/docker,troy0820/docker.github.io,konstruktoid/docker-upstream,twaugh/docker,kojiromike/docker,fcrisciani/docker,michael-holzheu/docker,mathewkoshy493/docker,alexisbellido/docker.github.io,haveatry/docker,anortef/docker,lixiaobing10051267/docker,coreos/docker,containers/storage,jzwlqx/denverdino.github.io,14rcole/docker,kerneltime/docker,johnstep/docker.github.io,thtanaka/docker,bfirsh/docker,nawawi/docker,alexisbellido/docker.github.io,Syntaxide/docker,phiroict/docker,shubheksha/docker.github.io,rhatdan/docker,eskaaren/docker,rancher/docker,tklauser/docker,KarthikNayak/docker,TrumanLing/docker,BenHall/docker,anweiss/docker.github.io,justincormack/docker,srust/docker,joaofnfernandes/docker.github.io,xiekeyang/docker,pradipd/moby,shubheksha/docker.github.io,tonistiigi/docker,djs55/docker,moxiegirl/docker,YuPengZTE/docker,mahak/docker,prertik/docker,sanjeo/docker,dgageot/docker,flavio/docker,michelvocks/docker,xuxinkun/docker,mtrmac/docker,LuisBosquez/docker.github.io,xiaods/docker,sfsmithcha/docker,rkazak/docker,KingEmet/docker,rancher/docker,isubuz/docker,JMesser81/docker,amatsus/docker,pyotr777/docker,gdevillele/docker.github.io,nguyentm83/docker,nalind/docker,kunalkushwaha/docker,ivansaracino/docker,DoraALin/docker,dperny/docker,darrenstahlmsft/docker,mikedougherty/docker,miminar/docker,mkumatag/docker,Morsicus/docker,JMesser81/docker,noironetworks/docker,Altiscale/docker,tophj-ibm/docker,HideoYamauchi/docker,joaofnfernandes/docker.github.io,johnstep/docker.github.io,errordeveloper/docker,stevvooe/docker,imkin/moby,alexisbellido/docker.github.io,yongtang/docker,gnailuy/docker,msabansal/docker,HideoYamauchi/docker,estesp/docker,AkihiroSuda/docker,naveed-jamil-tenpearls/moby,Mokolea/docker,jongiddy/docker,cpuguy83/docker,KingEmet/docker,qudongfang/docker,YujiOshima/docker,xiekeyang/docker,sdurrheimer/docker,rremer/moby,srust/docker,noironetworks/docker,moypray/docker,docker/docker,haveatry/docker,thaJeztah/docker.github.io,bdwill/docker.github.io,YuPengZTE/docker,x1022as/docker,mgoelzer/docker,scotttlin/docker,charleszheng44/moby,dsau/docker,justyntemme/docker,yasiramin10p/moby,anweiss/docker.github.io,achanda/docker,whuwxl/docker,paralin/docker,LuisBosquez/docker.github.io,mtrmac/docker,menglingwei/denverdino.github.io,docker/docker.github.io,gschaetz/moby,moul/docker,dccurtis/docker,coreos/docker,harche/docker,JimGalasyn/docker.github.io,xuxinkun/docker,YuPengZTE/docker,afein/docker,bearstech/moby,jzwlqx/denverdino.github.io,allencloud/docker,sanscontext/docker.github.io,jvanz/docker,qudongfang/docker,JMesser81/docker,docker-zh/docker.github.io,13W/docker,sterchelen/docker,ailispaw/docker,dims/docker,eskaaren/docker,denverdino/denverdino.github.io,diogomonica/docker,BSWANG/denverdino.github.io,mtanlee/docker,ibuildthecloud/docker,tophj-ibm/moby,bdwill/docker.github.io,xiaods/docker,nalind/docker,trebonian/docker,charleswhchan/docker,dims/docker,geekylucas/docker,alfred-landrum/docker,ffoysal/docker,Mokolea/docker,13W/docker,trebonian/docker,londoncalling/docker.github.io,duglin/docker,pecameron/docker,fcrisciani/docker,konstruktoid/docker-upstream,resin-io/docker,AkihiroSuda/docker,KingEmet/docker,michelvocks/docker,gjaskiewicz/moby,coolljt0725/docker,gschaetz/moby,londoncalling/docker.github.io,anortef/docker,thtanaka/docker,moul/docker,noxiouz/docker,jameszhan/docker,isubuz/docker,mtesselH/docker,shin-/docker.github.io,willmtemple/docker,moby/moby,denverdino/denverdino.github.io,pramodhkp/moby,thaJeztah/docker.github.io,gigidwan/docker,mikebrow/docker,cyli/docker,pecameron/docker,mikedougherty/docker,Tenk42/docker,docker/docker.github.io,ajaymdesai/docker,nawawi/docker,q384566678/docker,docker-zh/docker.github.io,brahmaroutu/docker,cr7pt0gr4ph7/docker,cyphar/docker,pradipd/moby,jzwlqx/denverdino.github.io,shin-/docker.github.io,JimGalasyn/docker.github.io,joeuo/docker.github.io,denverdino/docker.github.io,LaynePeng/docker,johnstep/moby-moby,dgageot/docker,crosbymichael/docker,nalind/docker,maxamillion/docker,cpuguy83/docker,catinthesky/docker,mohmost12/docker,trebonian/docker,Ramzec/docker,errordeveloper/docker,Shopify/docker,mkumatag/docker,moul/docker,hypriot/docker,aduermael/docker.github.io,rhatdan/storage,phiroict/docker,thaJeztah/docker.github.io,bfirsh/docker,rremer/moby,runcom/docker,rremer/moby,paralin/docker,sunyuan3/docker,hqhq/moby,projectatomic/docker,lixiaobing1/docker,kencochrane/docker,mahak/docker,denverdino/denverdino.github.io,sheimi/docker,achanda/docker,scotttlin/docker,kolyshkin/docker,xiekeyang/docker,runcom/docker,fcrisciani/docker,jwhonce/docker,LuisBosquez/docker.github.io,danyalKhaliq10p/moby,amatsus/docker,sanscontext/docker.github.io,rkazak/docker,mixja/docker,gigidwan/docker,tianon/docker,rillig/docker.github.io,AkihiroSuda/docker,rhardih/docker,containers/storage,jecarey/docker,jimjag/docker,OnePaaS/docker,nghiant2710/docker,whuwxl/docker,docker/docker.github.io,sarnautov/moby,ibuildthecloud/docker,denverdino/denverdino.github.io,ripcurld0/moby,akira-baruah/docker,alexisbellido/docker.github.io,johnstep/moby-moby,stevvooe/docker,Mokolea/docker,HuKeping/docker,jwhonce/docker,13W/docker,stevvooe/docker,joaofnfernandes/docker.github.io,hypriot/docker,diogomonica/docker,qudongfang/docker,madhanrm/docker,JimGalasyn/docker.github.io,michael-holzheu/docker,mtesselH/docker,phiroict/docker,londoncalling/docker.github.io,catinthesky/docker,danix800/docker.github.io,ColinHebert/docker,msabansal/docker,unclejack/docker,brahmaroutu/docker,Mokolea/docker,menglingwei/denverdino.github.io,asbjornenge/docker,dongjoon-hyun/docker,thaJeztah/docker.github.io,jthelin/docker,kolyshkin/moby,troy0820/docker.github.io,moypray/docker,laijs/docker,medallia/docker,q384566678/docker,trebonian/docker,endophage/docker,cr7pt0gr4ph7/docker,dmcgowan/docker,mikebrow/docker,icaoweiwei/docker,POLJM242/docker,aduermael/docker.github.io,yongtang/docker,noxiouz/docker,inatatsu/docker,pyotr777/docker,pecameron/docker,thaJeztah/docker,14rcole/docker,mtanlee/docker,willmtemple/docker,dnephin/docker,michael-holzheu/docker,nawawi/docker,rkazak/docker,LuisBosquez/docker.github.io,aduermael/docker.github.io,anujbahuguna/docker,OnePaaS/docker,x1022as/docker,PatrickLang/moby,splunk/docker,amatsus/docker,moby/moby,menglingwei/denverdino.github.io,kencochrane/docker,KarthikNayak/docker,tonistiigi/docker,dmcgowan/docker,bonczj/moby-json-file-logger,moxiegirl/docker,gdevillele/docker.github.io,sdurrheimer/docker,mohmost12/docker,jlebon/docker,jlhawn/docker,Mashimiao/docker,laijs/docker,containers/storage,tophj-ibm/moby,kerneltime/docker,Morsicus/docker,isubuz/docker,shin-/docker.github.io,sterchelen/docker,kolyshkin/docker,coolljt0725/docker,konstruktoid/docker-1,BenHall/docker,BSWANG/denverdino.github.io,jameszhan/docker,londoncalling/docker.github.io,sean-jc/docker,BSWANG/denverdino.github.io,bdwill/docker.github.io,ripcurld0/moby,tkopczynski/docker,harche/docker,bluebreezecf/docker,dccurtis/docker,danix800/docker.github.io,yp-engineering/docker,sanscontext/docker.github.io,tophj-ibm/moby,toli/docker,justincormack/docker,anweiss/docker.github.io,projectatomic/docker,jimjag/docker,stainboy/docker,kunalkushwaha/docker,dnephin/docker,dperny/docker,yosifkit/docker,cyphar/docker,docker/docker.github.io,docker/docker,geekylucas/docker,yongtang/docker,ripcurld0/moby,bearstech/moby,pramodhkp/moby,kencochrane/docker,toli/docker,srust/docker,umerazad/docker,ailispaw/docker,brahmaroutu/docker,abhinavdahiya/docker,vdemeester/docker,shin-/docker.github.io,yosifkit/docker,mohmost12/docker,crosbymichael/docker,konstruktoid/docker-1,tklauser/docker,lixiaobing10051267/docker,anweiss/docker.github.io,johnstep/moby-moby,kolyshkin/moby,imkin/moby,Microsoft/docker,errordeveloper/docker,liaoqingwei/docker,dsheets/moby,danix800/docker.github.io,estesp/docker,twaugh/docker,zhuguihua/docker,shhsu/docker,jhorwit2/docker,sanjeo/docker,BSWANG/denverdino.github.io,rhatdan/storage,erikh/docker,anortef/docker,yp-engineering/docker,gschaetz/moby,ffoysal/docker,pyotr777/docker,mstanleyjones/docker,jimjag/docker,jthelin/docker,OnePaaS/docker,ColinHebert/docker,Altiscale/docker,HuKeping/docker,miminar/docker,michelvocks/docker,unclejack/docker,resin-io/docker,kerneltime/docker,whuwxl/docker,mahak/docker,dsau/docker,yummypeng/docker,endophage/docker,dsau/docker,TheBigBear/docker,rhatdan/docker,sdurrheimer/docker,kolyshkin/moby,asbjornenge/docker,tagomoris/docker,jzwlqx/denverdino.github.io,liaoqingwei/docker,abhinavdahiya/docker,medallia/docker,wenchma/docker,ibuildthecloud/docker,gdevillele/docker.github.io,dongjoon-hyun/docker,gnailuy/docker,icaoweiwei/docker,docker-zh/docker.github.io,cpuguy83/docker,DoraALin/docker,allencloud/docker,dgageot/docker,mathewkoshy493/docker,johnstep/docker.github.io,BSWANG/denverdino.github.io,mkumatag/docker,thaJeztah/docker,PatrickLang/moby,Mashimiao/docker,13W/docker,wenchma/docker,moby/moby,sunyuan3/docker,Mashimiao/docker,harche/docker,thtanaka/docker,jecarey/docker,mtanlee/docker,bonczj/moby-json-file-logger,shhsu/docker,tklauser/docker,tagomoris/docker,flavio/docker,AkihiroSuda/docker,coolljt0725/docker,yosifkit/docker,cloudflare/docker,dnephin/docker,tophj-ibm/docker,mikedougherty/docker,JimGalasyn/docker.github.io,toli/docker,ndeloof/docker,cr7pt0gr4ph7/docker,twaugh/docker,charleswhchan/docker,laijs/docker,bdwill/docker.github.io,docker/docker,raja-sami-10p/moby,joeuo/docker.github.io,thaJeztah/docker,cyli/docker,ibuildthecloud/docker,kojiromike/docker,jongiddy/docker,rillig/docker.github.io,maxamillion/docker,achanda/docker,tmp6154/docker,inatatsu/docker,YujiOshima/docker,mstanleyjones/docker,bearstech/moby,x1022as/docker,dims/docker,mathewkoshy493/docker,sanscontext/docker.github.io,charleszheng44/moby,TheBigBear/docker,ibuildthecloud/docker,darrenstahlmsft/docker,nghiant2710/docker,mixja/docker,abhinavdahiya/docker,darrenstahlmsft/moby,mtrmac/docker,joaofnfernandes/docker.github.io,Syntaxide/docker,thaJeztah/docker