]> git.baikalelectronics.ru Git - kernel.git/commit
locking/refcount: Provide __refcount API to obtain the old value
authorPeter Zijlstra <peterz@infradead.org>
Wed, 29 Jul 2020 11:00:57 +0000 (13:00 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 26 Aug 2020 10:42:02 +0000 (12:42 +0200)
commit63e5e4aceaf39b1c68e5cd13c65cb7e9cdba9363
treea32c367027487b27bed5d119d1ed24ba36b1c9c0
parent79854c0d37fb152cc1e86ccc666bc13475f87656
locking/refcount: Provide __refcount API to obtain the old value

David requested means to obtain the old/previous value from the
refcount API for tracing purposes.

Duplicate (most of) the API as __refcount*() with an additional
'int *' argument into which, if !NULL, the old value will be stored.

Requested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/20200729111120.GA2638@hirez.programming.kicks-ass.net
include/linux/refcount.h