summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorBob Liu <bob.liu@oracle.com>2019-11-13 18:06:24 +0800
committerJens Axboe <axboe@kernel.dk>2019-11-13 19:41:01 -0700
commit2f6d9b9d6357ede64a29437676884ee263039910 (patch)
treed99cdde5575546b4ef318c5edd76e02a9efdaa01 /fs/io_uring.c
parente61df66c69b11bc050d233dc95714a6339192c28 (diff)
downloadlinux-stable-2f6d9b9d6357ede64a29437676884ee263039910.tar.gz
linux-stable-2f6d9b9d6357ede64a29437676884ee263039910.tar.bz2
linux-stable-2f6d9b9d6357ede64a29437676884ee263039910.zip
io_uring: clean up io_uring_cancel_files()
We don't use the return value anymore, drop it. Also drop the unecessary double cancel_req value check. Signed-off-by: Bob Liu <bob.liu@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index e1a3b8b667e0..297b9e80dc5c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4303,7 +4303,6 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx,
DEFINE_WAIT(wait);
while (!list_empty_careful(&ctx->inflight_list)) {
- enum io_wq_cancel ret = IO_WQ_CANCEL_NOTFOUND;
struct io_kiocb *cancel_req = NULL;
spin_lock_irq(&ctx->inflight_lock);
@@ -4321,14 +4320,12 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx,
TASK_UNINTERRUPTIBLE);
spin_unlock_irq(&ctx->inflight_lock);
- if (cancel_req) {
- ret = io_wq_cancel_work(ctx->io_wq, &cancel_req->work);
- io_put_req(cancel_req);
- }
-
/* We need to keep going until we don't find a matching req */
if (!cancel_req)
break;
+
+ io_wq_cancel_work(ctx->io_wq, &cancel_req->work);
+ io_put_req(cancel_req);
schedule();
}
finish_wait(&ctx->inflight_wait, &wait);