Re: [PATCH v3] io-wq: simplify code in __io_worker_busy

Jens Axboe
2021-04-05T21:46:50Z

On 4/5/21 1:53 AM, Hao Xu wrote:
> leverage xor to simplify code in __io_worker_busy
>
> Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
> ---
> fs/io-wq.c | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index 433c4d3c3c1c..8d8324eba2ec 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -276,10 +276,12 @@ static void io_wqe_dec_running(struct io_worker *worker)
> */
> static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker,
> struct io_wq_work *work)
> - __must_hold(wqe->lock)
> + __must_hold(w qe->lock)

Looks like something is off there? I see a v2 as well, but this one is
later, so...

--
Jens Axboe