Added err value to vma_split

This commit is contained in:
Bahadir Balban
2009-11-05 13:52:39 +02:00
parent 9b71f2bfe2
commit 74ad567312
+3 -2
View File
@@ -17,6 +17,7 @@ int vma_split(struct vm_area *vma, struct tcb *task,
{ {
struct vm_area *new; struct vm_area *new;
unsigned long unmap_start = pfn_start, unmap_end = pfn_end; unsigned long unmap_start = pfn_start, unmap_end = pfn_end;
int err;
/* Allocate an uninitialised vma first */ /* Allocate an uninitialised vma first */
if (!(new = vma_new(0, 0, 0, 0))) if (!(new = vma_new(0, 0, 0, 0)))
@@ -46,8 +47,8 @@ int vma_split(struct vm_area *vma, struct tcb *task,
list_insert_tail(&new->list, &vma->list); list_insert_tail(&new->list, &vma->list);
/* Unmap the removed portion */ /* Unmap the removed portion */
BUG_ON(l4_unmap((void *)__pfn_to_addr(unmap_start), BUG_ON((err = l4_unmap((void *)__pfn_to_addr(unmap_start),
unmap_end - unmap_start, task->tid) < 0); unmap_end - unmap_start, task->tid)) < 0);
return 0; return 0;
} }