return 0;
}
-static int xenmem_add_to_physmap_once(struct domain *d,
- const struct xen_add_to_physmap *xatp)
+static int xenmem_add_to_physmap_once(
+ struct domain *d,
+ const struct xen_add_to_physmap *xatp)
{
struct page_info *page = NULL;
unsigned long gfn = 0; /* gcc ... */
if ( p2m_is_shared(p2mt) )
{
put_gfn(d, gfn);
- rcu_unlock_domain(d);
return -ENOMEM;
}
if ( !get_page_from_pagenr(idx, d) )
if ( xatp->space == XENMAPSPACE_gmfn ||
xatp->space == XENMAPSPACE_gmfn_range )
put_gfn(d, gfn);
- rcu_unlock_domain(d);
return -EINVAL;
}
put_gfn(d, gfn);
domain_unlock(d);
- rcu_unlock_domain(d);
-
return rc;
}
if ( xatp.space == XENMAPSPACE_gmfn_range )
{
- if ( rc )
- {
- if ( copy_to_guest(arg, &xatp, 1) )
- return -EFAULT;
- }
+ if ( rc && copy_to_guest(arg, &xatp, 1) )
+ rc = -EFAULT;
if ( rc == -EAGAIN )
rc = hypercall_create_continuation(