lockref: remove count argument of lockref_init

All users of lockref_init() now initialize the count to 1, so hardcode
that and remove the count argument.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Link: https://lore.kernel.org/r/20250130135624.1899988-4-agruenba@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Andreas Gruenbacher
2025-01-30 14:56:23 +01:00
committed by Christian Brauner
parent 34ad6fa2ad
commit bb504b4d64
5 changed files with 8 additions and 7 deletions

View File

@@ -37,12 +37,13 @@ struct lockref {
/**
* lockref_init - Initialize a lockref
* @lockref: pointer to lockref structure
* @count: initial count
*
* Initializes @lockref->count to 1.
*/
static inline void lockref_init(struct lockref *lockref, unsigned int count)
static inline void lockref_init(struct lockref *lockref)
{
spin_lock_init(&lockref->lock);
lockref->count = count;
lockref->count = 1;
}
void lockref_get(struct lockref *lockref);