slightly simplify SCHEDOP_remote_shutdown handling
PATCH 1/1 slightly simplify SCHEDOP_remote_shutdown handling
There's no need for two exit paths each using rcu_unlock_domain() on its own here.
Signed-off-by Jan Beulich <[email protected]>
xen/common/schedule.c +2 -8
@@ -970,16 +970,10 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANbreak ; ret =xsm_schedop_shutdown (XSM_DM_PRIV , current->domain, d); -if ( ret ) - { -rcu_unlock_domain (d); -return ret; - } - -domain_shutdown (d, (u8 )sched_remote_shutdown.reason); +if (likely (!ret) ) +domain_shutdown (d, sched_remote_shutdown.reason);rcu_unlock_domain (d); - ret =0 ;break ; }
slightly simplify SCHEDOP_remote_shutdown handling
There's no need for two exit paths each using rcu_unlock_domain() on its own here.
Signed-off-by Jan Beulich <[email protected]>
xen/common/schedule.c +2 -8
@@ -970,16 +970,10 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANbreak ; ret =xsm_schedop_shutdown (XSM_DM_PRIV , current->domain, d); -if ( ret ) - { -rcu_unlock_domain (d); -return ret; - } - -domain_shutdown (d, (u8 )sched_remote_shutdown.reason); +if (likely (!ret) ) +domain_shutdown (d, sched_remote_shutdown.reason);rcu_unlock_domain (d); - ret =0 ;break ; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 4 lines · Jan Beulich
There's no need for two exit paths each using
rcu_unlock_domain()on its own here.Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>
Quoted 4 lines · Jan Beulich
There's no need for two exit paths each using
rcu_unlock_domain()on its own here.Signed-off-by Jan Beulich <[email protected]>
Acked-by George Dunlap <[email protected]>
Quoted 25 lines
xen/common/schedule.c +2
-8@@ -970,16 +970,10 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANbreak ; ret =xsm_schedop_shutdown (XSM_DM_PRIV , current->domain, d); -if ( ret ) - { -rcu_unlock_domain (d); -return ret; - } - -domain_shutdown (d, (u8 )sched_remote_shutdown.reason); +if (likely (!ret) ) +domain_shutdown (d, sched_remote_shutdown.reason);rcu_unlock_domain (d); - ret =0 ;break ; }