Skip to content

Commit

Permalink
io_uring: remove redundant variable pointer nxt and io_wq_assign_next…
Browse files Browse the repository at this point in the history
… call

An earlier commit "io_uring: remove @nxt from handlers" removed the
setting of pointer nxt and now it is always null, hence the non-null
check and call to io_wq_assign_next is redundant and can be removed.

Addresses-Coverity: ("'Constant' variable guard")
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Colin Ian King authored and Jens Axboe committed Apr 7, 2020
1 parent 48bdd84 commit 211fea1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -3509,14 +3509,11 @@ static void __io_sync_file_range(struct io_kiocb *req)
static void io_sync_file_range_finish(struct io_wq_work **workptr)
{
struct io_kiocb *req = container_of(*workptr, struct io_kiocb, work);
struct io_kiocb *nxt = NULL;

if (io_req_cancelled(req))
return;
__io_sync_file_range(req);
io_put_req(req); /* put submission ref */
if (nxt)
io_wq_assign_next(workptr, nxt);
}

static int io_sync_file_range(struct io_kiocb *req, bool force_nonblock)
Expand Down

0 comments on commit 211fea1

Please sign in to comment.