[OpenAFS-devel] vmalloc failure in afs_CheckVolumeNames...

chas williams (contractor) chas@cmf.nrl.navy.mil
Tue, 04 May 2004 16:40:18 -0400


In message <5C51DC2B8353AB4BA2CD04B34F2EE79C3EFF97@umr-umail1.umr.edu>,"Neuling
er, Nathan" writes:
>        for (i = 0; i < NVOLS; i++)
>            for (tv = afs_volumes[i]; tv; tv = tv->next)
>                ++vsize;
>
>        volumeID = (afs_int32 *) afs_osi_Alloc(2 * vsize *
>sizeof(*volumeID));
>        osi_Assert(volumeID);
>
>        cellID = (volumeID) ? volumeID + vsize : 0;
>    }

you dont need to osi_Assert() here actually since the later code 
handles the condition where volumeID == NULL. 

i imagine they need to do this instead of grabbing both the 
afs_xvcache and afs_xvolume locks because they drop the afs_xvcache
lock while iterating afs_vhashT[].  this is probably one of those
bits of afs that needs a bit of work.