io_uring: abstract out helper for removing poll waitqs/hashes
authorJens Axboe <axboe@kernel.dk>
Tue, 23 Feb 2021 15:58:04 +0000 (08:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 11 Apr 2021 23:41:59 +0000 (17:41 -0600)
No functional changes in this patch, just preparation for kill multishot
poll on CQ overflow.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index 80db5898e1192009736d34624e447383ae0517f5..12f686283aded12ae3deec848d4260ff806ddd00 100644 (file)
@@ -5216,7 +5216,7 @@ static bool __io_poll_remove_one(struct io_kiocb *req,
        return do_complete;
 }
 
-static bool io_poll_remove_one(struct io_kiocb *req)
+static bool io_poll_remove_waitqs(struct io_kiocb *req)
 {
        bool do_complete;
 
@@ -5236,6 +5236,14 @@ static bool io_poll_remove_one(struct io_kiocb *req)
                }
        }
 
+       return do_complete;
+}
+
+static bool io_poll_remove_one(struct io_kiocb *req)
+{
+       bool do_complete;
+
+       do_complete = io_poll_remove_waitqs(req);
        if (do_complete) {
                io_cqring_fill_event(req, -ECANCELED);
                io_commit_cqring(req->ctx);