diff options
author | 2025-01-30 14:56:23 +0100 | |
---|---|---|
committer | 2025-02-07 10:27:25 +0100 | |
commit | bb504b4d64266fa0d7460c218c85afed371db03a (patch) | |
tree | 5e25bfc902fc92efa01e566105e1c9aaa3ffc7cb /include/linux/lockref.h | |
parent | gfs2: switch to lockref_init(..., 1) (diff) | |
download | wireguard-linux-bb504b4d64266fa0d7460c218c85afed371db03a.tar.xz wireguard-linux-bb504b4d64266fa0d7460c218c85afed371db03a.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | include/linux/lockref.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/lockref.h b/include/linux/lockref.h index c39f119659ba..676721ee878d 100644 --- a/include/linux/lockref.h +++ b/include/linux/lockref.h @@ -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); |