On Mon, Nov 15, 2021 at 05:29:10PM -0500, Waiman Long wrote:I am going to restructure the code there to make it easier to see that only the first waiter will have this bit set to avoid this confusion.
The handoff_set flag can only be true for a first waiter. A random waiter inBah, I thought it would unconditionally propagate the bit from @count. I
the middle of a wait queue will never has this flag set.
This flag is set in two places in rwsem_try_write_lock():
missed the early exit :/