From b0a20349f212dc725f5ddfd060e426fe6181d9c5 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Fri, 28 Feb 2020 10:36:35 +0300 Subject: io_uring: clean io_poll_complete Deduplicate call to io_cqring_fill_event(), plain and easy Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- 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 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); } -- cgit v1.2.3-58-ga151