Skip to content

Commit

Permalink
io_uring: remove dead non-zero 'poll' check
Browse files Browse the repository at this point in the history
Colin reports that Coverity complains about checking for poll being
non-zero after having dereferenced it multiple times. This is a valid
complaint, and actually a leftover from back when this code was based
on the aio poll code.

Kill the redundant check.

Link: https://lore.kernel.org/io-uring/[email protected]/
Reported-by: Colin Ian King <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Jul 9, 2021
1 parent 8f487ef commit 9ce85ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -4956,7 +4956,7 @@ static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,

list_del_init(&wait->entry);

if (poll && poll->head) {
if (poll->head) {
bool done;

spin_lock(&poll->head->lock);
Expand Down

0 comments on commit 9ce85ef

Please sign in to comment.