提交 5b8ddf08 编写于 作者: S Stefan Bühler 提交者: Cheng Jian

req->error only used for iopoll

mainline inclusion
from mainline-5.2-rc1
commit 5dcf877f
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27
CVE: NA
---------------------------

No need to set it in io_poll_add; io_poll_complete doesn't use it to set
the result in the CQE.
Signed-off-by: NStefan Bühler <source@stbuehler.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 e7f38422
...@@ -333,7 +333,7 @@ struct io_kiocb { ...@@ -333,7 +333,7 @@ struct io_kiocb {
#define REQ_F_IO_DRAIN 32 /* drain existing IO first */ #define REQ_F_IO_DRAIN 32 /* drain existing IO first */
#define REQ_F_IO_DRAINED 64 /* drain done */ #define REQ_F_IO_DRAINED 64 /* drain done */
u64 user_data; u64 user_data;
u32 error; u32 error; /* iopoll result from callback */
u32 sequence; u32 sequence;
struct work_struct work; struct work_struct work;
...@@ -1517,7 +1517,6 @@ static int io_poll_add(struct io_kiocb *req, const struct io_uring_sqe *sqe) ...@@ -1517,7 +1517,6 @@ static int io_poll_add(struct io_kiocb *req, const struct io_uring_sqe *sqe)
spin_unlock(&poll->head->lock); spin_unlock(&poll->head->lock);
} }
if (mask) { /* no async, we'd stolen it */ if (mask) { /* no async, we'd stolen it */
req->error = mangle_poll(mask);
ipt.error = 0; ipt.error = 0;
io_poll_complete(ctx, req, mask); io_poll_complete(ctx, req, mask);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册