mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
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:
committed by
Thomas Gleixner
parent
823a566221
commit
19298f4869
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user