Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59a51c1d authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf machine: Stop accessing atomic_t::counter directly

Use atomic_read(&counter) instead.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-k3hvfvpaut8wp02lzq27muhb@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 848cbd25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1311,7 +1311,7 @@ static void __machine__remove_thread(struct machine *machine, struct thread *th,
	if (machine->last_match == th)
		machine->last_match = NULL;

	BUG_ON(th->refcnt.counter == 0);
	BUG_ON(atomic_read(&th->refcnt) == 0);
	if (lock)
		pthread_rwlock_wrlock(&machine->threads_lock);
	rb_erase(&th->rb_node, &machine->threads);