io_uring: remove dead 'poll_only' argument to io_poll_cancel()
authorJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 16:43:58 +0000 (10:43 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Apr 2022 00:18:18 +0000 (18:18 -0600)
It's only called from one location, and it always passes in 'false'.
Kill the argument, and just pass in 'false' to io_poll_find().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20220418164402.75259-2-axboe@kernel.dk
fs/io_uring.c

index d3bf214..be625f5 100644 (file)
@@ -6326,11 +6326,10 @@ static bool io_poll_disarm(struct io_kiocb *req)
        return true;
 }
 
-static int io_poll_cancel(struct io_ring_ctx *ctx, __u64 sqe_addr,
-                         bool poll_only)
+static int io_poll_cancel(struct io_ring_ctx *ctx, __u64 sqe_addr)
        __must_hold(&ctx->completion_lock)
 {
-       struct io_kiocb *req = io_poll_find(ctx, sqe_addr, poll_only);
+       struct io_kiocb *req = io_poll_find(ctx, sqe_addr, false);
 
        if (!req)
                return -ENOENT;
@@ -6819,7 +6818,7 @@ static int io_try_cancel_userdata(struct io_kiocb *req, u64 sqe_addr)
                return 0;
 
        spin_lock(&ctx->completion_lock);
-       ret = io_poll_cancel(ctx, sqe_addr, false);
+       ret = io_poll_cancel(ctx, sqe_addr);
        if (ret != -ENOENT)
                goto out;
        ret = io_timeout_cancel(ctx, sqe_addr);