Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6af1c849 authored by Wei Yongjun's avatar Wei Yongjun Committed by Al Viro
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}