mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
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>
This commit is contained in:
parent
b90cd197f9
commit
f6b6c7d6a9
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user