summaryrefslogtreecommitdiff
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-06-15 10:24:04 +0300
committerJens Axboe <axboe@kernel.dk>2020-06-15 17:51:34 +0300
commit44e728b8aae0bb6d4229129083974f9dea43f50b (patch)
tree0b34f50ac8706d4c8d9ee801bf680ea06a27e10c /fs/io-wq.c
parent4f26bda1522c35d2701fc219368c7101c17005c1 (diff)
downloadlinux-44e728b8aae0bb6d4229129083974f9dea43f50b.tar.xz
io_uring: cancel all task's requests on exit
If a process is going away, io_uring_flush() will cancel only 1 request with a matching pid. Cancel all of them Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index e290202d6f64..47c5f3aeb460 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -1018,20 +1018,6 @@ enum io_wq_cancel io_wq_cancel_work(struct io_wq *wq, struct io_wq_work *cwork)
return io_wq_cancel_cb(wq, io_wq_io_cb_cancel_data, (void *)cwork, false);
}
-static bool io_wq_pid_match(struct io_wq_work *work, void *data)
-{
- pid_t pid = (pid_t) (unsigned long) data;
-
- return work->task_pid == pid;
-}
-
-enum io_wq_cancel io_wq_cancel_pid(struct io_wq *wq, pid_t pid)
-{
- void *data = (void *) (unsigned long) pid;
-
- return io_wq_cancel_cb(wq, io_wq_pid_match, data, false);
-}
-
struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
{
int ret = -ENOMEM, node;