OSDN Git Service

locking/refcount: Remove unused refcount_*_checked() variants
authorWill Deacon <will@kernel.org>
Thu, 21 Nov 2019 11:58:55 +0000 (11:58 +0000)
committerIngo Molnar <mingo@kernel.org>
Mon, 25 Nov 2019 08:15:03 +0000 (09:15 +0100)
commit7221762c48c6bbbcc6cc51d8b803c06930215e34
tree4cd9689dc05038035d0198c86e96afe15e79e425
parent97a1420adf0cdf0cf6f41bab0b2acf658c96b94b
locking/refcount: Remove unused refcount_*_checked() variants

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>
include/linux/refcount.h
lib/refcount.c