diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-12 14:12:14 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 15:17:35 +0300 |
commit | 30da1b45b130c70945b033900f45c9d61d6f3b4a (patch) | |
tree | 756e4022cf4ed83d9be55daefa5865d4fc4137e5 /fs | |
parent | f79d474905fec0bfae1244e75571b7916fe02ea2 (diff) | |
download | linux-30da1b45b130c70945b033900f45c9d61d6f3b4a.tar.xz |
io_uring: fix a layering violation in io_iopoll_req_issued
syscall-level code can't just poke into the details of the poll cookie,
which is private information of the block layer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211012111226.760968-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index e68d27829bb2..d2e86788c872 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2738,19 +2738,12 @@ static void io_iopoll_req_issued(struct io_kiocb *req) ctx->poll_multi_queue = false; } else if (!ctx->poll_multi_queue) { struct io_kiocb *list_req; - unsigned int queue_num0, queue_num1; list_req = list_first_entry(&ctx->iopoll_list, struct io_kiocb, inflight_entry); - if (list_req->file != req->file) { + if (list_req->file != req->file) ctx->poll_multi_queue = true; - } else { - queue_num0 = blk_qc_t_to_queue_num(list_req->rw.kiocb.ki_cookie); - queue_num1 = blk_qc_t_to_queue_num(req->rw.kiocb.ki_cookie); - if (queue_num0 != queue_num1) - ctx->poll_multi_queue = true; - } } /* |