> > if (WARN_ON_ONCE(atomic_long_cmpxchg(&file->f_count, 1, 0) != 1)) { > bench again. Can you see how much of a difference it makes because imho it really looks a lot nicer then this ugly atomic_read followed by atomic_set...
> > if (WARN_ON_ONCE(atomic_long_cmpxchg(&file->f_count, 1, 0) != 1)) { > bench again. Can you see how much of a difference it makes because imho it really looks a lot nicer then this ugly atomic_read followed by atomic_set...
![]() |