Skip to content

Commit 6af1c84

Browse files
Wei YongjunAl Viro
authored andcommitted
aio: use kmem_cache_free() instead of kfree()
memory allocated by kmem_cache_alloc() should be freed using kmem_cache_free(), not kfree(). Fixes: fa0ca2a ("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>
1 parent 27fad74 commit 6af1c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/aio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ static inline struct aio_kiocb *aio_get_req(struct kioctx *ctx)
10341034
return NULL;
10351035

10361036
if (unlikely(!get_reqs_available(ctx))) {
1037-
kfree(req);
1037+
kmem_cache_free(kiocb_cachep, req);
10381038
return NULL;
10391039
}
10401040

0 commit comments

Comments
 (0)