aufs: add lock around mount
aufs: add lock around mount

Apparently there is some kind of race in aufs kernel module code,
which leads to the errors like:

[98221.158606] aufs au_xino_create2:186:dockerd[25801]: aufs.xino create err -17
[98221.162128] aufs au_xino_set:1229:dockerd[25801]: I/O Error, failed creating xino(-17).
[98362.239085] aufs au_xino_create2:186:dockerd[6348]: aufs.xino create err -17
[98362.243860] aufs au_xino_set:1229:dockerd[6348]: I/O Error, failed creating xino(-17).
[98373.775380] aufs au_xino_create:767:dockerd[27435]: open /dev/shm/aufs.xino(-17)
[98389.015640] aufs au_xino_create2:186:dockerd[26753]: aufs.xino create err -17
[98389.018776] aufs au_xino_set:1229:dockerd[26753]: I/O Error, failed creating xino(-17).
[98424.117584] aufs au_xino_create:767:dockerd[27105]: open /dev/shm/aufs.xino(-17)

So, we have to have a lock around mount syscall.

While at it, don't call the whole Unmount() on an error path, as
it leads to bogus error from auplink flush.

Signed-off-by: Kir Kolyshkin <3a017b8ddb3f9cf3e4a59978b004111bdeb97f08@gmail.com>

cpuguy83/docker,estesp/docker,ibuildthecloud/docker,thaJeztah/docker,Mokolea/docker,kolyshkin/moby,SvenDowideit/docker,jameszhan/docker,moul/docker,Ramzec/docker,jthelin/docker,pradipd/moby,trebonian/docker,jvanz/docker,vdemeester/docker,tmp6154/docker,moul/docker,cpuguy83/docker,Ramzec/docker,pradipd/moby,mikebrow/docker,nawawi/docker,yosifkit/docker,dims/docker,moby/moby,gnailuy/docker,AkihiroSuda/docker,kojiromike/docker,dims/docker,djs55/docker,thaJeztah/docker,yosifkit/docker,rremer/moby,crosbymichael/docker,konstruktoid/docker-upstream,kojiromike/docker,AkihiroSuda/docker,moby/moby,mikebrow/docker,tmp6154/docker,mahak/docker,cpuguy83/docker,kojiromike/docker,bearstech/moby,konstruktoid/docker-upstream,nalind/docker,moul/docker,docker/docker,Mokolea/docker,ibuildthecloud/docker,tmp6154/docker,rremer/moby,paralin/docker,nawawi/docker,kolyshkin/moby,jvanz/docker,Ramzec/docker,konstruktoid/docker-1,ibuildthecloud/docker,thaJeztah/docker,justincormack/docker,konstruktoid/docker-upstream,AkihiroSuda/docker,trebonian/docker,pradipd/moby,nawawi/docker,SvenDowideit/docker,ibuildthecloud/docker,Mokolea/docker,justincormack/docker,estesp/docker,estesp/docker,bearstech/moby,gnailuy/docker,bearstech/moby,unclejack/docker,yosifkit/docker,nawawi/docker,nalind/docker,flavio/docker,jimjag/docker,trebonian/docker,dims/docker,cpuguy83/docker,trebonian/docker,gnailuy/docker,gnailuy/docker,ibuildthecloud/docker,Ramzec/docker,crosbymichael/docker,unclejack/docker,crosbymichael/docker,rremer/moby,flavio/docker,konstruktoid/docker-1,jimjag/docker,moul/docker,docker/docker,vdemeester/docker,SvenDowideit/docker,flavio/docker,paralin/docker,bearstech/moby,konstruktoid/docker-upstream,mikebrow/docker,jvanz/docker,docker/docker,vdemeester/docker,thaJeztah/docker,mahak/docker,jameszhan/docker,moby/moby,yongtang/docker,paralin/docker,AkihiroSuda/docker,yongtang/docker,justincormack/docker,mahak/docker,Mokolea/docker,djs55/docker,paralin/docker,jameszhan/docker,mahak/docker,djs55/docker,jthelin/docker,flavio/docker,jimjag/docker,jimjag/docker,yongtang/docker,unclejack/docker,kolyshkin/moby,nalind/docker,konstruktoid/docker-1,yosifkit/docker,nalind/docker,moby/moby