/* Function for gracefully deactivating a write buffer record. 
This function will first release any buffers, then invalidate the record. */
static void write_buffer_record_release(pdb_buffer_record_t *p_write_buffer_record)
/* Function for gracefully deactivating a write buffer record. 
This function will first release any buffers, then invalidate the record. */
static void write_buffer_record_release(pdb_buffer_record_t *p_write_buffer_record)
{
    for (uint32_t i = 0; i < p_write_buffer_record->n_bufs; i++)
    {
        pm_buffer_release(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id + i);
    }
    write_buffer_record_invalidate(p_write_buffer_record);
}