summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-02-28 10:36:35 +0300
committerJens Axboe <axboe@kernel.dk>2020-03-02 14:04:37 -0700
commitb0a20349f212dc725f5ddfd060e426fe6181d9c5 (patch)
treed141d9dee439bbc3138d276f33ada1a881b2e393
parent7d67af2c013402537385dae343a2d0f6a4cb3bfd (diff)
io_uring: clean io_poll_complete
Deduplicate call to io_cqring_fill_event(), plain and easy Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 1ef20a2af10b..f4c6661b33bc 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3641,10 +3641,7 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error)
struct io_ring_ctx *ctx = req->ctx;
req->poll.done = true;
- if (error)
- io_cqring_fill_event(req, error);
- else
- io_cqring_fill_event(req, mangle_poll(mask));
+ io_cqring_fill_event(req, error ? error : mangle_poll(mask));
io_commit_cqring(ctx);
}