adjust a few RCU domain locking calls
authorJan Beulich <jbeulich@suse.com>
Fri, 7 Sep 2012 15:58:12 +0000 (17:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Sep 2012 15:58:12 +0000 (17:58 +0200)
commit79e6ef8c0cf1dd0820c950bb653985a8beb04203
tree39960fa3732cea2ee65b769523951b9b240a7729
parent42599de39a98fd826b6b6bac0738a8a0d9df18fe
adjust a few RCU domain locking calls

x86's do_physdev_op() had a case where the locking was entirely
superfluous. Its physdev_map_pirq() further had a case where the lock
was being obtained too early, needlessly complicating early exit paths.

Grant table code had two open coded instances of
rcu_lock_target_domain_by_id(), and a third code section could be
consolidated by using the newly introduced helper function.

The memory hypercall code had two more instances of open coding
rcu_lock_target_domain_by_id(), but note that here this is not just
cleanup, but also fixes an error return path in memory_exchange() to
actually return an error.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/physdev.c
xen/common/grant_table.c
xen/common/memory.c