]> git.baikalelectronics.ru Git - kernel.git/commit
locking/refcount: Remove unused refcount_*_checked() variants
authorWill Deacon <will@kernel.org>
Thu, 21 Nov 2019 11:58:55 +0000 (11:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:17 +0000 (17:14 +0200)
commit31cfc036faa250fcfc3aa8d90db75492de657c04
tree87ea0704414ef5f9750652699fb69454d3e14d79
parent4a6066cac433432c3db8179a412405c836fb0aa2
locking/refcount: Remove unused refcount_*_checked() variants

[ Upstream commit 5c4b997083551a55280de1cc9828e77e6d38adbe ]

The full-fat refcount implementation is exposed via a set of functions
suffixed with "_checked()", the idea being that code can choose to use
the more expensive, yet more secure implementation on a case-by-case
basis.

In reality, this hasn't happened, so with a grand total of zero users,
let's remove the checked variants for now by simply dropping the suffix
and predicating the out-of-line functions on CONFIG_REFCOUNT_FULL=y.

Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191121115902.2551-4-will@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/refcount.h
lib/refcount.c