diff options
| author | Christoph Hellwig <[email protected]> | 2025-01-15 09:46:37 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-01-16 10:48:10 +0000 |
| commit | 4b193fa75efffd90c054d1a7f2b5dbe29a461c14 (patch) | |
| tree | 8e27062697a5ac57905853e3cbbb53bf6bf4bf3b /lib/lockref.c | |
| parent | fs: Fix return type of do_mount() from long to int (diff) | |
| download | kernel-4b193fa75efffd90c054d1a7f2b5dbe29a461c14.tar.gz kernel-4b193fa75efffd90c054d1a7f2b5dbe29a461c14.zip | |
lockref: remove lockref_put_not_zero
lockref_put_not_zero is not used anywhere, and unless I'm missing
something didn't end up being used used at all. Remove it.
Signed-off-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/lockref.c')
| -rw-r--r-- | lib/lockref.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/lockref.c b/lib/lockref.c index 2afe4c5d8919..a68192c979b3 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -82,34 +82,6 @@ int lockref_get_not_zero(struct lockref *lockref) EXPORT_SYMBOL(lockref_get_not_zero); /** - * lockref_put_not_zero - Decrements count unless count <= 1 before decrement - * @lockref: pointer to lockref structure - * Return: 1 if count updated successfully or 0 if count would become zero - */ -int lockref_put_not_zero(struct lockref *lockref) -{ - int retval; - - CMPXCHG_LOOP( - new.count--; - if (old.count <= 1) - return 0; - , - return 1; - ); - - spin_lock(&lockref->lock); - retval = 0; - if (lockref->count > 1) { - lockref->count--; - retval = 1; - } - spin_unlock(&lockref->lock); - return retval; -} -EXPORT_SYMBOL(lockref_put_not_zero); - -/** * lockref_put_return - Decrement reference count if possible * @lockref: pointer to lockref structure * |
