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

Re: [Xen-devel] [PATCH v2] xen: stop_machine: fill fn_result only in case of error.



On Wed, May 31, 2017 at 12:41:32PM +0200, gregory.herrero@xxxxxxxxxx wrote:
> From: Gregory Herrero <gregory.herrero@xxxxxxxxxx>
>  
> @@ -150,8 +155,11 @@ static void stopmachine_action(unsigned long cpu)
>          case STOPMACHINE_INVOKE:
>              if ( (stopmachine_data.fn_cpu == smp_processor_id()) ||
>                   (stopmachine_data.fn_cpu == NR_CPUS) )
> -                stopmachine_data.fn_result =
> -                    stopmachine_data.fn(stopmachine_data.fn_data);
> +         {
> +                int ret = stopmachine_data.fn(stopmachine_data.fn_data);
> +                if ( ret )
> +                    write_atomic(&stopmachine_data.fn_result, ret);
> +         }

Indentation is wrong.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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