fix devshr related panic caused by Mount.to being nil (thanks mischief!)

the shr mount is linked into the Mhead with m->to initially nil. only
after the the server has been attached is m->to set. just check for
it in createdir().
This commit is contained in:
cinap_lenrek 2013-10-30 21:24:44 +01:00
parent 6d4e9f11b7
commit 7211fd7ce7

View file

@ -1171,7 +1171,7 @@ createdir(Chan *c, Mhead *m)
nexterror();
}
for(f = m->mount; f; f = f->next){
if(f->mflag&MCREATE){
if(f->to != nil && (f->mflag&MCREATE) != 0){
nc = cclone(f->to);
runlock(&m->lock);
poperror();