ia64/xen-unstable
changeset 6704:a27e28d38d52
Build fix.
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Sep 08 17:36:37 2005 +0000 (2005-09-08) |
parents | 5321e0858b0d |
children | aa0990ef260f |
files | xen/common/grant_table.c |
line diff
1.1 --- a/xen/common/grant_table.c Thu Sep 08 17:29:02 2005 +0000 1.2 +++ b/xen/common/grant_table.c Thu Sep 08 17:36:37 2005 +0000 1.3 @@ -815,19 +815,24 @@ gnttab_donate(gnttab_donate_t *uop, unsi 1.4 #endif 1.5 page = &frame_table[gop->mfn]; 1.6 1.7 - if (unlikely(IS_XEN_HEAP_FRAME(page))) { 1.8 + if ( unlikely(IS_XEN_HEAP_FRAME(page))) 1.9 + { 1.10 printk("gnttab_donate: xen heap frame mfn=%lx\n", 1.11 (unsigned long) gop->mfn); 1.12 gop->status = GNTST_bad_virt_addr; 1.13 continue; 1.14 } 1.15 - if (unlikely(!pfn_valid(page_to_pfn(page)))) { 1.16 + 1.17 + if ( unlikely(!pfn_valid(page_to_pfn(page))) ) 1.18 + { 1.19 printk("gnttab_donate: invalid pfn for mfn=%lx\n", 1.20 (unsigned long) gop->mfn); 1.21 gop->status = GNTST_bad_virt_addr; 1.22 continue; 1.23 } 1.24 - if (unlikely((e = find_domain_by_id(gop->domid)) == NULL)) { 1.25 + 1.26 + if ( unlikely((e = find_domain_by_id(gop->domid)) == NULL) ) 1.27 + { 1.28 printk("gnttab_donate: can't find domain %d\n", gop->domid); 1.29 gop->status = GNTST_bad_domain; 1.30 continue; 1.31 @@ -881,13 +886,14 @@ gnttab_donate(gnttab_donate_t *uop, unsi 1.32 * headroom. Also, a domain mustn't have PGC_allocated 1.33 * pages when it is dying. 1.34 */ 1.35 - ASSERT(e->tot_pages <= e->max_pages); 1.36 - if (unlikely(test_bit(DOMFLAGS_DYING, &e->domain_flags)) || 1.37 - unlikely(e->tot_pages == e->max_pages) || 1.38 - unlikely(!gnttab_prepare_for_transfer(e, d, gop->handle))) { 1.39 - printk("gnttab_donate: Transferee has no reservation headroom (%d," 1.40 - "%d) or provided a bad grant ref (%08x) or is dying (%p)\n", 1.41 - e->tot_pages, e->max_pages, gop->handle, e->d_flags); 1.42 + if ( unlikely(test_bit(DOMFLAGS_DYING, &e->domain_flags)) || 1.43 + unlikely(e->tot_pages >= e->max_pages) || 1.44 + unlikely(!gnttab_prepare_for_transfer(e, d, gop->handle)) ) 1.45 + { 1.46 + DPRINTK("gnttab_donate: Transferee has no reservation headroom " 1.47 + "(%d,%d) or provided a bad grant ref (%08x) or " 1.48 + "is dying (%lx)\n", 1.49 + e->tot_pages, e->max_pages, gop->handle, e->domain_flags); 1.50 spin_unlock(&e->page_alloc_lock); 1.51 put_domain(e); 1.52 gop->status = result = GNTST_general_error; 1.53 @@ -895,9 +901,8 @@ gnttab_donate(gnttab_donate_t *uop, unsi 1.54 } 1.55 1.56 /* Okay, add the page to 'e'. */ 1.57 - if (unlikely(e->tot_pages++ == 0)) { 1.58 + if ( unlikely(e->tot_pages++ == 0) ) 1.59 get_knownalive_domain(e); 1.60 - } 1.61 list_add_tail(&page->list, &e->page_list); 1.62 page_set_owner(page, e); 1.63 1.64 @@ -913,6 +918,7 @@ gnttab_donate(gnttab_donate_t *uop, unsi 1.65 1.66 gop->status = GNTST_okay; 1.67 } 1.68 + 1.69 return result; 1.70 } 1.71