mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-12 18:35:35 -04:00
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:
committed by
Christian Brauner
parent
34ad6fa2ad
commit
bb504b4d64
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user