From 15e6a3006cfd35b4d195a11bfffde76fff4cdbfd Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Fri, 28 Feb 2020 10:36:35 +0300 Subject: [PATCH] io_uring: clean io_poll_complete to #28170604 commit b0a20349f212dc725f5ddfd060e426fe6181d9c5 upstream Deduplicate call to io_cqring_fill_event(), plain and easy Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Acked-by: Joseph Qi Signed-off-by: Xiaoguang Wang --- fs/io_uring.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 24962368a3b5..3495700f0921 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -3650,10 +3650,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); } -- GitLab