diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-04-04 10:44:05 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-05 02:13:59 +0200 |
commit | 6af1c849dfb1f1d326fbdd157c9bc882b921f450 (patch) | |
tree | c18cbae2df9acef4118d5d0475ff2b72b0227958 /fs | |
parent | iov_iter: Fix build error without CONFIG_CRYPTO (diff) | |
download | linux-6af1c849dfb1f1d326fbdd157c9bc882b921f450.tar.xz linux-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')
-rw-r--r-- | fs/aio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |