diff options
| author | Andreas Gruenbacher <agruenba@redhat.com> | 2025-01-30 16:56:23 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-02-07 12:27:25 +0300 |
| commit | bb504b4d64266fa0d7460c218c85afed371db03a (patch) | |
| tree | 5e25bfc902fc92efa01e566105e1c9aaa3ffc7cb /include/linux/lockref.h | |
| parent | 34ad6fa2add2b38f2a89d28518de0142bff8fb43 (diff) | |
| download | linux-bb504b4d64266fa0d7460c218c85afed371db03a.tar.xz | |
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 'include/linux/lockref.h')
| -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); |
