BufferAlloc: don't take two simultaneous locks

BufferAlloc: don't take two simultaneous locks

Edit