提交 96fd84d8 编写于 作者: Y YueHaibing 提交者: Jens Axboe

io_uring: Remove unnecessary null check

Null check kfree is redundant, so remove it.
This is detected by coccinelle.
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 fddaface
...@@ -1160,8 +1160,7 @@ static void __io_req_aux_free(struct io_kiocb *req) ...@@ -1160,8 +1160,7 @@ static void __io_req_aux_free(struct io_kiocb *req)
{ {
struct io_ring_ctx *ctx = req->ctx; struct io_ring_ctx *ctx = req->ctx;
if (req->io) kfree(req->io);
kfree(req->io);
if (req->file) { if (req->file) {
if (req->flags & REQ_F_FIXED_FILE) if (req->flags & REQ_F_FIXED_FILE)
percpu_ref_put(&ctx->file_data->refs); percpu_ref_put(&ctx->file_data->refs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册