Commit 6af1c849 authored by Wei Yongjun's avatar Wei Yongjun Committed by 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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 27fad74a
...@@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx) ...@@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx)
return NULL; return NULL;
if (unlikely(!get_reqs_available(ctx))) { if (unlikely(!get_reqs_available(ctx))) {
kfree(req); kmem_cache_free(kiocb_cachep, req);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment