From 74ad5673127d19b4e13a51a3bb973ae612faf465 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 5 Nov 2009 13:52:39 +0200 Subject: [PATCH] Added err value to vma_split --- conts/posix/mm0/mm/munmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conts/posix/mm0/mm/munmap.c b/conts/posix/mm0/mm/munmap.c index 4261b3c..5c6850c 100644 --- a/conts/posix/mm0/mm/munmap.c +++ b/conts/posix/mm0/mm/munmap.c @@ -17,6 +17,7 @@ int vma_split(struct vm_area *vma, struct tcb *task, { struct vm_area *new; unsigned long unmap_start = pfn_start, unmap_end = pfn_end; + int err; /* Allocate an uninitialised vma first */ 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); /* Unmap the removed portion */ - BUG_ON(l4_unmap((void *)__pfn_to_addr(unmap_start), - unmap_end - unmap_start, task->tid) < 0); + BUG_ON((err = l4_unmap((void *)__pfn_to_addr(unmap_start), + unmap_end - unmap_start, task->tid)) < 0); return 0; }