Skip to content

Commit 295227b

Browse files
ubizjakebiederm
authored andcommitted
ucount: Fix atomic_long_inc_below argument type
The type of u argument of atomic_long_inc_below should be long to avoid unwanted truncation to int. Fixes: f9c82a4 ("Increase size of ucounts to atomic_long_t") Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Link: https://lkml.kernel.org/r/20221017144049.3404-2-ubizjak@gmail.com Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
1 parent b7b275e commit 295227b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/ucount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void put_ucounts(struct ucounts *ucounts)
212212
}
213213
}
214214

215-
static inline bool atomic_long_inc_below(atomic_long_t *v, int u)
215+
static inline bool atomic_long_inc_below(atomic_long_t *v, long u)
216216
{
217217
long c, old;
218218
c = atomic_long_read(v);

0 commit comments

Comments
 (0)