提交 6af1c849 编写于 作者: W Wei Yongjun 提交者: Al Viro

aio: use kmem_cache_free() instead of kfree()

memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Fixes: fa0ca2ae ("deal with get_reqs_available() in aio_get_req() itself")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 27fad74a
......@@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx)
return NULL;
if (unlikely(!get_reqs_available(ctx))) {
kfree(req);
kmem_cache_free(kiocb_cachep, req);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册