diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-24 21:33:09 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-18 08:29:58 -0700 |
commit | 71ebc6fef0f53459f37fb39e1466792232fa52ee (patch) | |
tree | 65a2aaf2a92a6ab8fc0880c03b51a1c9c0ec5639 /fs/aio.c | |
parent | a79d40e9b0f309dcddc4e0bf5b64e51e28153e55 (diff) | |
download | linux-71ebc6fef0f53459f37fb39e1466792232fa52ee.tar.gz linux-71ebc6fef0f53459f37fb39e1466792232fa52ee.tar.bz2 linux-71ebc6fef0f53459f37fb39e1466792232fa52ee.zip |
aio: use iocb_put() instead of open coding it
Replace the percpu_ref_put() + kmem_cache_free() with a call to
iocb_put() instead.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1886,10 +1886,9 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, goto out_put_req; return 0; out_put_req: - percpu_ref_put(&ctx->reqs); if (req->ki_eventfd) eventfd_ctx_put(req->ki_eventfd); - kmem_cache_free(kiocb_cachep, req); + iocb_put(req); out_put_reqs_available: put_reqs_available(ctx, 1); return ret; |