mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
io_uring/poll: improve readability of poll reference decrementing
This overly long line is hard to read. Break it up by AND'ing the ref mask first, then perform the atomic_sub_return() with the value itself. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
9fe3eaea4a
commit
3cdc4be114
@ -343,8 +343,8 @@ static int io_poll_check_events(struct io_kiocb *req, struct io_tw_state *ts)
|
||||
* Release all references, retry if someone tried to restart
|
||||
* task_work while we were executing it.
|
||||
*/
|
||||
} while (atomic_sub_return(v & IO_POLL_REF_MASK, &req->poll_refs) &
|
||||
IO_POLL_REF_MASK);
|
||||
v &= IO_POLL_REF_MASK;
|
||||
} while (atomic_sub_return(v, &req->poll_refs) & IO_POLL_REF_MASK);
|
||||
|
||||
return IOU_POLL_NO_ACTION;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user