@@ -486,7 +486,7 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch
spblk->start = blk->start;
spblk->size = sp_size;
/* add before the blk */
- list_add(&spblk->list, blk->list.prev);
+ list_add_before(&spblk->list, &blk->list);
}
newblk = get_slot(info);
newblk->start = start;
@@ -120,7 +120,7 @@ ppc_vm_region_alloc(struct ppc_vm_region *head, size_t size, gfp_t gfp)
/*
* Insert this entry _before_ the one we found.
*/
- list_add_tail(&new->vm_list, &c->vm_list);
+ list_add_before(&new->vm_list, &c->vm_list);
new->vm_start = addr;
new->vm_end = addr + size;