diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2022-07-25 13:49:22 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-07-25 13:49:22 +1000 |
commit | 3c69a99b62fde9de86a612ef1daaa07d95f0a773 (patch) | |
tree | 2a82c3ba8926092d35a9ef1ddc62a08cf19ac981 /lib/lockref.c | |
parent | be640317a1d0b9cf42fedb2debc2887a7cfa38de (diff) | |
parent | ff6992735ade75aae3e35d16b17da1008d753d28 (diff) |
Merge tag 'v5.19-rc7' into fixes
Merge v5.19-rc7 into fixes to bring in:
d11219ad53dc ("amdgpu: disable powerpc support for the newer display engine")
Diffstat (limited to 'lib/lockref.c')
-rw-r--r-- | lib/lockref.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/lockref.c b/lib/lockref.c index c6f0b183b937..45e93ece8ba0 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -111,31 +111,6 @@ int lockref_put_not_zero(struct lockref *lockref) EXPORT_SYMBOL(lockref_put_not_zero); /** - * lockref_get_or_lock - Increments count unless the count is 0 or dead - * @lockref: pointer to lockref structure - * Return: 1 if count updated successfully or 0 if count was zero - * and we got the lock instead. - */ -int lockref_get_or_lock(struct lockref *lockref) -{ - CMPXCHG_LOOP( - new.count++; - if (old.count <= 0) - break; - , - return 1; - ); - - spin_lock(&lockref->lock); - if (lockref->count <= 0) - return 0; - lockref->count++; - spin_unlock(&lockref->lock); - return 1; -} -EXPORT_SYMBOL(lockref_get_or_lock); - -/** * lockref_put_return - Decrement reference count if possible * @lockref: pointer to lockref structure * |