summaryrefslogtreecommitdiff
path: root/fs/aio.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-04-04 08:44:05 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2019-04-04 20:13:59 -0400
commit6af1c849dfb1f1d326fbdd157c9bc882b921f450 (patch)
treec18cbae2df9acef4118d5d0475ff2b72b0227958 /fs/aio.c
parent27fad74a5a77fe2e1f876db7bf27efcf2ec304b2 (diff)
downloadlwn-6af1c849dfb1f1d326fbdd157c9bc882b921f450.tar.gz
lwn-6af1c849dfb1f1d326fbdd157c9bc882b921f450.zip
aio: use kmem_cache_free() instead of kfree()
memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Fixes: fa0ca2aee3be ("deal with get_reqs_available() in aio_get_req() itself") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 7ccecaab487a..3490d1fa0e16 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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;
}