/* Add a new head to the linked list.  */
static void* ramfs_ll_ins_head(ramfs_ll_t *ll)
/* Add a new head to the linked list.  */
static void* ramfs_ll_ins_head(ramfs_ll_t *ll)
{
    ramfs_ll_node_t *new = NULL;
    new = ramfs_mm_alloc(ll->size + RAMFS_LL_NODE_META_SIZE);
    if (new != NULL) {
        ramfs_node_set_prev(ll, new, NULL);
        ramfs_node_set_next(ll, new, ll->head);
        if (ll->head != NULL) {
            ramfs_node_set_prev(ll, ll->head, new);
        }
        ll->head = new;
        if (ll->tail == NULL) {
            ll->tail = new;
        }
    }
    return new;
}