Re: [PATCH 1/4] locking/ww_mutex: Simplify use_ww_ctx & ww_ctx handling

2021-03-16 Thread Davidlohr Bueso
On Tue, 16 Mar 2021, Waiman Long wrote: The use_ww_ctx flag is passed to mutex_optimistic_spin(), but the function doesn't use it. The frequent use of the (use_ww_ctx && ww_ctx) combination is repetitive. I always found that very fugly. In fact, ww_ctx should not be used at all if

[PATCH 1/4] locking/ww_mutex: Simplify use_ww_ctx & ww_ctx handling

2021-03-16 Thread Waiman Long
The use_ww_ctx flag is passed to mutex_optimistic_spin(), but the function doesn't use it. The frequent use of the (use_ww_ctx && ww_ctx) combination is repetitive. In fact, ww_ctx should not be used at all if !use_ww_ctx. Simplify ww_mutex code by dropping use_ww_ctx from