mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
locking/refcount: Remove the half-implemented refcount_sub() API
CONFIG_REFCOUNT_FULL=y (correctly) does not provide a refcount_sub(),
which should not be part of proper refcount design patterns.
Remove the erroneous extern and the later !CONFIG_REFCOUNT_FULL
accidental implementation.
Signed-off-by: Kees Cook <[email protected]>
Cc: Elena Reshetova <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: 29dee3c03a ("locking/refcounts: Out-of-line everything")
Link: http://lkml.kernel.org/r/20170701180129.GA17405@beast
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
fd25d19f6b
commit
5d6dec6fba
1 changed files with 0 additions and 6 deletions
|
|
@ -49,7 +49,6 @@ extern __must_check bool refcount_inc_not_zero(refcount_t *r);
|
|||
extern void refcount_inc(refcount_t *r);
|
||||
|
||||
extern __must_check bool refcount_sub_and_test(unsigned int i, refcount_t *r);
|
||||
extern void refcount_sub(unsigned int i, refcount_t *r);
|
||||
|
||||
extern __must_check bool refcount_dec_and_test(refcount_t *r);
|
||||
extern void refcount_dec(refcount_t *r);
|
||||
|
|
@ -79,11 +78,6 @@ static inline __must_check bool refcount_sub_and_test(unsigned int i, refcount_t
|
|||
return atomic_sub_and_test(i, &r->refs);
|
||||
}
|
||||
|
||||
static inline void refcount_sub(unsigned int i, refcount_t *r)
|
||||
{
|
||||
atomic_sub(i, &r->refs);
|
||||
}
|
||||
|
||||
static inline __must_check bool refcount_dec_and_test(refcount_t *r)
|
||||
{
|
||||
return atomic_dec_and_test(&r->refs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue