kernel: remove wrong and needles mapsize check in newseg() (thanks Yoann Padioleau)

This commit is contained in:
cinap_lenrek 2014-06-03 07:47:09 +02:00
parent 5ab9f9c621
commit 0aa3af0934

View file

@ -66,8 +66,6 @@ newseg(int type, uintptr base, ulong size)
mapsize = ROUND(size, PTEPERTAB)/PTEPERTAB;
if(mapsize > nelem(s->ssegmap)){
if(mapsize > (SEGMAPSIZE*PTEPERTAB))
mapsize = (SEGMAPSIZE*PTEPERTAB);
s->map = smalloc(mapsize*sizeof(Pte*));
s->mapsize = mapsize;
}