[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] slightly simplify SCHEDOP_remote_shutdown handling



On 06/17/2015 01:55 PM, Jan Beulich wrote:
> There's no need for two exit paths each using rcu_unlock_domain() on
> its own here.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

> 
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -970,16 +970,10 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HAN
>              break;
>  
>          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
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.