diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-21 13:09:53 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-21 20:46:05 -0600 |
commit | f6b6c7d6a9600bdbf5826f57137630e1670e2d87 (patch) | |
tree | 45c941fe8d0a4ab642dbe99cf3d4f4f8b3bc74ff /fs/io_uring.c | |
parent | b90cd197f9315f968d5ee4e6ee9f4e3067f2c883 (diff) | |
download | lwn-f6b6c7d6a9600bdbf5826f57137630e1670e2d87.tar.gz lwn-f6b6c7d6a9600bdbf5826f57137630e1670e2d87.zip |
io_uring: kill NULL checks for submit state
After recent changes, io_submit_sqes() always passes valid submit state,
so kill leftovers checking it for NULL.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index cc1f2f3b7bfa..c686061c3762 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1376,11 +1376,7 @@ static struct io_kiocb *io_alloc_req(struct io_ring_ctx *ctx, gfp_t gfp = GFP_KERNEL | __GFP_NOWARN; struct io_kiocb *req; - if (!state) { - req = kmem_cache_alloc(req_cachep, gfp); - if (unlikely(!req)) - goto fallback; - } else if (!state->free_reqs) { + if (!state->free_reqs) { size_t sz; int ret; |