* [PATCH] io_uring: Remove unnecessary conditional statement
@ 2025-08-15 7:58 Xichao Zhao
0 siblings, 0 replies; only message in thread
From: Xichao Zhao @ 2025-08-15 7:58 UTC (permalink / raw)
To: axboe; +Cc: io-uring, linux-kernel, Xichao Zhao
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@vivo.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-15 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 7:58 [PATCH] io_uring: Remove unnecessary conditional statement Xichao Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox