lkml.org 
[lkml]   [2018]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] perf/hw_breakpoint: Simplify breakpoint enable in perf_event_modify_breakpoint
On 08/10, Jiri Olsa wrote:
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -2867,16 +2867,11 @@ static int perf_event_modify_breakpoint(struct perf_event *bp,
> _perf_event_disable(bp);
>
> err = modify_user_hw_breakpoint_check(bp, attr, true);
> - if (err) {
> - if (!bp->attr.disabled)
> - _perf_event_enable(bp);
>
> - return err;
> - }
> -
> - if (!attr->disabled)
> + if (!bp->attr.disabled)
> _perf_event_enable(bp);
> - return 0;
> +
> + return err;
> }

Acked-by: Oleg Nesterov <oleg@redhat.com>

\
 
 \ /
  Last update: 2018-08-14 12:33    [W:0.082 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site