[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250815075805.580465-1-zhao.xichao@vivo.com>
Date: Fri, 15 Aug 2025 15:58:05 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: axboe@...nel.dk
Cc: io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] io_uring: Remove unnecessary conditional statement
In the kfree() function, the passed argument is checked. Therefore,
the conditional statement in io_free_batch_list() can be removed.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
io_uring/io_uring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 4ef69dd58734..7a9106066653 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1469,8 +1469,7 @@ static void io_free_batch_list(struct io_ring_ctx *ctx,
if ((req->flags & REQ_F_POLLED) && req->apoll) {
struct async_poll *apoll = req->apoll;
- if (apoll->double_poll)
- kfree(apoll->double_poll);
+ kfree(apoll->double_poll);
io_cache_free(&ctx->apoll_cache, apoll);
req->flags &= ~REQ_F_POLLED;
}
--
2.34.1
Powered by blists - more mailing lists