futex: Use atomic64_inc_return() in get_inode_sequence_number()

Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
to use optimized implementation and ease register pressure around
the primitive for targets that implement optimized variant.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://lore.kernel.org/all/20241010071023.21913-1-ubizjak@gmail.com
This commit is contained in:
Uros Bizjak 2024-10-10 09:10:04 +02:00 committed by Thomas Gleixner
parent 823a566221
commit 19298f4869

View File

@ -181,7 +181,7 @@ static u64 get_inode_sequence_number(struct inode *inode)
return old;
for (;;) {
u64 new = atomic64_add_return(1, &i_seq);
u64 new = atomic64_inc_return(&i_seq);
if (WARN_ON_ONCE(!new))
continue;