[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <15f4a519-cc2b-1cad-571a-a36e67d6101f@kernel.dk>
Date: Tue, 21 Feb 2023 16:53:27 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Breno Leitao <leitao@...ian.org>,
Pavel Begunkov <asml.silence@...il.com>,
io-uring@...r.kernel.org
Cc: leit@...a.com, linux-kernel@...r.kernel.org, gustavold@...a.com
Subject: Re: [PATCH 1/2] io_uring: Move from hlist to io_wq_work_node
On 2/21/23 11:38?AM, Breno Leitao wrote:
> Sure. I will remove the assignents in "if" part and maybe replicate what
> we have
> in io_alloc_cache_get(). Something as:
> if (cache->list.next) {
> node = cache->list.next;
>
> Thanks for the review!
Pavel is right in that we generally discourage assignments in if
statements etc. For the above, the usual approach would be:
node = cache->list.next;
if (node) {
...
}
--
Jens Axboe
Powered by blists - more mailing lists